const _my = require("../__antmove/api/index.js")(my);
const wx = _my;
!(function(e, t) {
    "object" == typeof exports && "object" == typeof module
        ? (module.exports = t())
        : "function" == typeof define && define.amd
        ? define("AgoraSDK", [], t)
        : "object" == typeof exports
        ? (exports.AgoraSDK = t())
        : (e.AgoraSDK = t());
})(window, function() {
    return (function(e) {
        var t = {};
        function i(n) {
            if (t[n]) return t[n].exports;
            var r = (t[n] = {
                i: n,
                l: !1,
                exports: {}
            });
            return e[n].call(r.exports, r, r.exports, i), (r.l = !0), r.exports;
        }
        return (
            (i.m = e),
            (i.c = t),
            (i.d = function(e, t, n) {
                i.o(e, t) ||
                    Object.defineProperty(e, t, {
                        enumerable: !0,
                        get: n
                    });
            }),
            (i.r = function(e) {
                "undefined" != typeof Symbol &&
                    Symbol.toStringTag &&
                    Object.defineProperty(e, Symbol.toStringTag, {
                        value: "Module"
                    }),
                    Object.defineProperty(e, "__esModule", {
                        value: !0
                    });
            }),
            (i.t = function(e, t) {
                if ((1 & t && (e = i(e)), 8 & t)) return e;
                if (4 & t && "object" == typeof e && e && e.__esModule)
                    return e;
                var n = Object.create(null);
                if (
                    (i.r(n),
                    Object.defineProperty(n, "default", {
                        enumerable: !0,
                        value: e
                    }),
                    2 & t && "string" != typeof e)
                )
                    for (var r in e)
                        i.d(
                            n,
                            r,
                            function(t) {
                                return e[t];
                            }.bind(null, r)
                        );
                return n;
            }),
            (i.n = function(e) {
                var t =
                    e && e.__esModule
                        ? function() {
                              return e.default;
                          }
                        : function() {
                              return e;
                          };
                return i.d(t, "a", t), t;
            }),
            (i.o = function(e, t) {
                return Object.prototype.hasOwnProperty.call(e, t);
            }),
            (i.p = ""),
            i((i.s = 52))
        );
    })([
        function(e, t, i) {
            "use strict";

            i.r(t),
                i.d(t, "Log", function() {
                    return u;
                });
            var n = i(11),
                r = i.n(n),
                s = i(2),
                a = i.n(s),
                o = i(3),
                l = i.n(o),
                u = (function() {
                    function e() {
                        a()(this, e), (this.level = 3), (this.onLog = null);
                    }
                    return (
                        l()(e, [
                            {
                                key: "setLogLevel",
                                value: function(e) {
                                    if (
                                        "number" != typeof e ||
                                        !(e <= 4 && e >= -1)
                                    )
                                        throw Error("Invaild level");
                                    this.level = e;
                                }
                            },
                            {
                                key: "log",
                                value: function() {
                                    var e,
                                        t = Array.prototype.slice.call(
                                            arguments
                                        );
                                    this.onLog && this.onLog(JSON.stringify(t)),
                                        (e = console).log.apply(e, r()(t));
                                }
                            },
                            {
                                key: "err",
                                value: function() {
                                    var e,
                                        t = Array.prototype.slice.call(
                                            arguments
                                        );
                                    this.onLog && this.onLog(JSON.stringify(t)),
                                        (e = console).error.apply(e, r()(t));
                                }
                            },
                            {
                                key: "blind",
                                value: function() {
                                    var e = Array.prototype.slice.call(
                                        arguments
                                    );
                                    this.level <= -1 &&
                                        this.log.apply(
                                            this,
                                            [
                                                "".concat(
                                                    new Date(),
                                                    " [BLIND]: "
                                                )
                                            ].concat(r()(e))
                                        );
                                }
                            },
                            {
                                key: "debug",
                                value: function() {
                                    var e = Array.prototype.slice.call(
                                        arguments
                                    );
                                    this.level <= 0 &&
                                        this.log.apply(
                                            this,
                                            [
                                                "".concat(
                                                    new Date(),
                                                    " [DEBUG]: "
                                                )
                                            ].concat(r()(e))
                                        );
                                }
                            },
                            {
                                key: "info",
                                value: function(e) {
                                    this.level <= 1 &&
                                        this.log(
                                            ""
                                                .concat(new Date(), " [INFO]: ")
                                                .concat(e)
                                        );
                                }
                            },
                            {
                                key: "warn",
                                value: function(e) {
                                    this.level <= 2 &&
                                        this.log(
                                            ""
                                                .concat(new Date(), " [WARN]: ")
                                                .concat(e)
                                        );
                                }
                            },
                            {
                                key: "error",
                                value: function(e) {
                                    this.level <= 3 &&
                                        this.err(
                                            ""
                                                .concat(
                                                    new Date(),
                                                    " [ERROR]: "
                                                )
                                                .concat(e)
                                        );
                                }
                            }
                        ]),
                        e
                    );
                })(),
                c = new u();
            t.default = c;
        },
        function(e, t, i) {
            "use strict";

            var n =
                    (this && this.__awaiter) ||
                    function(e, t, i, n) {
                        return new (i || (i = Promise))(function(r, s) {
                            function a(e) {
                                try {
                                    l(n.next(e));
                                } catch (e) {
                                    s(e);
                                }
                            }
                            function o(e) {
                                try {
                                    l(n.throw(e));
                                } catch (e) {
                                    s(e);
                                }
                            }
                            function l(e) {
                                var t;
                                e.done
                                    ? r(e.value)
                                    : ((t = e.value),
                                      t instanceof i
                                          ? t
                                          : new i(function(e) {
                                                e(t);
                                            })).then(a, o);
                            }
                            l((n = n.apply(e, t || [])).next());
                        });
                    },
                r =
                    (this && this.__importDefault) ||
                    function(e) {
                        return e && e.__esModule
                            ? e
                            : {
                                  default: e
                              };
                    };
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
                (t.CHANNEL_MEDIA_RELAY_ERROR = t.CHANNEL_MEDIA_RELAY_STATE = t.CHANNEL_MEDIA_RELAY_EVENT = t.CHANNEL_MEDIA_ERROR = t.ChannelMediaError = t.ChannelMediaRelayConfiguration = void 0);
            const s = r(i(33)),
                a = i(4),
                o = r(i(0)),
                l = i(6),
                u = i(5),
                c = () => {};
            class p extends s.default {
                constructor(e, t) {
                    super(),
                        (this._state = v.RELAY_STATE_IDLE),
                        (this._onStatus = e => {
                            o.default.debug(
                                `[${
                                    this.clientId
                                }] ChannelMediaStatus: ${JSON.stringify(e)}`
                            ),
                                e &&
                                    e.command &&
                                    ("onAudioPacketReceived" === e.command &&
                                        this.emit(
                                            "event",
                                            g.PACKET_RECEIVED_AUDIO_FROM_SRC
                                        ),
                                    "onVideoPacketReceived" === e.command &&
                                        this.emit(
                                            "event",
                                            g.PACKET_RECEIVED_VIDEO_FROM_SRC
                                        ),
                                    "onSrcTokenPrivilegeDidExpire" ===
                                        e.command &&
                                        ((this._state = v.RELAY_STATE_FAILURE),
                                        this.emit(
                                            "state",
                                            v.RELAY_STATE_FAILURE,
                                            w.SRC_TOKEN_EXPIRED
                                        )),
                                    "onDestTokenPrivilegeDidExpire" ===
                                        e.command &&
                                        ((this._state = v.RELAY_STATE_FAILURE),
                                        this.emit(
                                            "state",
                                            v.RELAY_STATE_FAILURE,
                                            w.DEST_TOKEN_EXPIRED,
                                            e.channelName
                                                ? {
                                                      came: e.channelName
                                                  }
                                                : null
                                        )));
                        }),
                        (this._onClose = () =>
                            n(this, void 0, void 0, function*() {
                                if (
                                    (o.default.debug(
                                        `[${this.clientId}] ChannelMediaSocket onClose`
                                    ),
                                    this.emit("event", g.NETWORK_DISCONNECTED),
                                    (this.state = v.RELAY_STATE_IDLE),
                                    this._prevChannelMediaConfig)
                                )
                                    try {
                                        yield this.startChannelMediaRelay(
                                            this._prevChannelMediaConfig
                                        );
                                    } catch (e) {
                                        if (
                                            e instanceof d &&
                                            (e.message === f.WS_ABORT ||
                                                e.message ===
                                                    f.AP_REQUEST_ABORT)
                                        )
                                            return;
                                        this.emit(
                                            "state",
                                            v.RELAY_STATE_FAILURE,
                                            w.SERVER_CONNECTION_LOST
                                        );
                                    }
                            })),
                        (this.token = e.appId),
                        (this.appId = e.appId),
                        (this.cname = e.cname),
                        (this.uid = e.uid),
                        (this.sid = e.sid),
                        (this.clientId = t);
                }
                set state(e) {
                    const t = this._state;
                    (this._state = e), t !== e && this.emit("state", e);
                }
                get state() {
                    return this._state;
                }
                startChannelMediaRelay(e) {
                    return n(this, void 0, void 0, function*() {
                        if (this.state !== v.RELAY_STATE_IDLE)
                            throw new d(f.BAD_STATE);
                        (this.state = v.RELAY_STATE_CONNECTING),
                            yield this._connect(),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: connect success`
                            ),
                            yield this._sendStartRelayMessage(e),
                            (this._prevChannelMediaConfig = e);
                    });
                }
                updateChannelMediaRelay(e) {
                    return n(this, void 0, void 0, function*() {
                        if (this.state !== v.RELAY_STATE_RUNNING)
                            throw new d(f.BAD_STATE);
                        yield this._sendUpdateMessage(e),
                            (this._prevChannelMediaConfig = e);
                    });
                }
                stopChannelMediaRelay() {
                    return n(this, void 0, void 0, function*() {
                        yield this._sendStopRelayMessage(),
                            o.default.debug(
                                `[${this.clientId}] stopChannelMediaRelay: send stop message success`
                            ),
                            (this.state = v.RELAY_STATE_IDLE),
                            this.dispose();
                    });
                }
                dispose() {
                    o.default.debug(
                        `[${this.clientId}] disposeChannelMediaRelay`
                    ),
                        (this.state = v.RELAY_STATE_IDLE),
                        this.emit("dispose"),
                        this._signal && this._signal.dispose(),
                        (this._prevChannelMediaConfig = null),
                        this.removeEvent();
                }
                _requestOneAP(e) {
                    return new Promise((t, i) => {
                        const n = {
                                command: "convergeAllocateEdge",
                                sid: this.sid,
                                appId: this.appId,
                                token: "",
                                ts: +new Date(),
                                version: a.VERSION,
                                cname: this.cname,
                                uid: this.uid + "",
                                seq: 1,
                                requestId: 1
                            },
                            r = {
                                service_name: "tele_channel",
                                json_body: JSON.stringify(n)
                            },
                            s = "https://" + e;
                        wx.request({
                            url: s,
                            data: r,
                            header: {
                                "content-type": "application/json",
                                "X-Packet-Service-Type": 0,
                                "X-Packet-URI": 61
                            },
                            method: "POST",
                            success: e => {
                                let n = null,
                                    r = null;
                                try {
                                    n = e.data;
                                } catch (e) {
                                    i(new d(f.AP_JSON_PARSE_ERROR, e));
                                }
                                0 !== n.code && i(new d(f.AP_REQUEST_ERROR, n));
                                try {
                                    r = JSON.parse(n.json_body);
                                } catch (e) {
                                    i(new d(f.AP_JSON_PARSE_ERROR, e));
                                }
                                200 !== r.code &&
                                    i(new d(f.AP_REQUEST_ERROR, r)),
                                    r.servers
                                        ? t(r.servers)
                                        : i(new d(f.AP_JSON_PARSE_ERROR, r));
                            },
                            fail: e => i(e)
                        });
                    });
                }
                _requestAP() {
                    const e = [
                        "uap-ap-web-1.agora.io",
                        "uap-ap-web-2.agoraio.cn",
                        "uap-ap-web-3.agora.io",
                        "uap-ap-web-4.agoraio.cn"
                    ];
                    return new Promise((t, i) => {
                        setTimeout(() => {
                            i(new d(f.AP_REQUEST_TIMEOUT));
                        }, 3e3),
                            this.on("dispose", () => {
                                i(new d(f.AP_REQUEST_ABORT));
                            }),
                            e.forEach(e => {
                                (e += "/api/v1"),
                                    this._requestOneAP(e)
                                        .then(i => {
                                            o.default.debug(
                                                `[${
                                                    this.clientId
                                                }] startChannelMediaRelay request AP ${e} success: ${JSON.stringify(
                                                    i
                                                )}`
                                            );
                                            const n = i[0];
                                            let r = (e = n.address).split("."),
                                                s = r.length;
                                            const a = `wss://miniapp.agoraio.cn/${
                                                r[s - 4]
                                            }-${r[s - 3]}-${r[s - 2]}-${
                                                r[s - 1]
                                            }-${n.ws}/`;
                                            t(a);
                                        })
                                        .catch(t => {
                                            o.default.debug(
                                                `[${
                                                    this.clientId
                                                }] startChannelMediaRelay request AP ${e} failed: ${JSON.stringify(
                                                    t
                                                )}`
                                            );
                                        });
                            });
                    });
                }
                _connectWebsocket(e) {
                    return (
                        (this._signal = new h(
                            this.appId,
                            this.cname,
                            this.uid,
                            this.sid
                        )),
                        this._signal.connect(e)
                    );
                }
                _connect() {
                    return n(this, void 0, void 0, function*() {
                        const e = yield this._requestAP();
                        yield this._connectWebsocket(e),
                            this._signal.on("close", this._onClose.bind(this)),
                            this._signal.on(
                                "status",
                                this._onStatus.bind(this)
                            ),
                            this.emit("event", g.NETWORK_CONNECTED);
                    });
                }
                _sendStartRelayMessage(e) {
                    return n(this, void 0, void 0, function*() {
                        this._checkSignal();
                        const t = this._genMessage(y.StopPacketTransfer);
                        yield Promise.all([
                            this._signal.request(t),
                            this._signal.waitStatus("Normal Quit")
                        ]),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: StopPacketTransfer success`
                            );
                        const i = this._genMessage(y.SetSdkProfile, e);
                        yield this._signal.request(i),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: SetSdkProfile success`
                            );
                        const n = this._genMessage(y.SetSourceChannel, e);
                        yield Promise.all([
                            this._signal.request(n),
                            this._signal.waitStatus("SetSourceChannelStatus")
                        ]),
                            this.emit("event", g.PACKET_JOINED_SRC_CHANNEL),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: SetSourceChannel success`
                            );
                        const r = this._genMessage(y.SetSourceUserId, e);
                        yield this._signal.request(r),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: SetSourceUserId success`
                            );
                        const s = this._genMessage(y.SetDestChannel, e);
                        yield Promise.all([
                            this._signal.request(s),
                            this._signal.waitStatus("SetDestChannelStatus")
                        ]),
                            this.emit("event", g.PACKET_JOINED_DEST_CHANNEL),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: SetDestChannel success`
                            );
                        const a = this._genMessage(y.StartPacketTransfer, e);
                        yield this._signal.request(a),
                            this.emit("event", g.PACKET_SENT_TO_DEST_CHANNEL),
                            (this.state = v.RELAY_STATE_RUNNING),
                            o.default.debug(
                                `[${this.clientId}] startChannelMediaRelay: StartPacketTransfer success`
                            );
                    });
                }
                _sendReconnectMessage(e) {
                    return n(this, void 0, void 0, function*() {
                        this._checkSignal();
                        const t = this._genMessage(y.Reconnect, e);
                        yield this._signal.request(t);
                    });
                }
                _sendUpdateMessage(e) {
                    return n(this, void 0, void 0, function*() {
                        this._checkSignal();
                        const t = this._genMessage(y.UpdateDestChannel, e);
                        yield this._signal.request(t),
                            this.emit("event", g.PACKET_UPDATE_DEST_CHANNEL),
                            o.default.debug(
                                `[${this.clientId}] sendUpdateMessage: UpdateDestChannel success`
                            );
                    });
                }
                _sendStopRelayMessage() {
                    return n(this, void 0, void 0, function*() {
                        this._checkSignal();
                        const e = this._genMessage(y.StopPacketTransfer);
                        yield this._signal.request(e),
                            o.default.debug(
                                `[${this.clientId}] sendStopRelayMessage: StopPacketTransfer success`
                            );
                    });
                }
                _genMessage(e, t) {
                    const i = [],
                        n = [],
                        r = [],
                        s = {
                            appId: this.appId,
                            cname: this.cname,
                            uid: this.uid + "",
                            sdkVersion: a.VERSION,
                            sid: this.sid,
                            ts: +new Date(),
                            requestId: 0,
                            seq: 0,
                            allocate: !0,
                            clientRequest: {}
                        };
                    let o = null,
                        l = null;
                    switch (e) {
                        case y.SetSdkProfile:
                            return (
                                (s.clientRequest = {
                                    command: "SetSdkProfile",
                                    type: "multi_channel"
                                }),
                                s
                            );
                        case y.SetSourceChannel:
                            return (
                                (l = t.getSrcChannelMediaInfo()),
                                (s.clientRequest = {
                                    command: "SetSourceChannel",
                                    uid: l.uid + "",
                                    channelName: l.channelName,
                                    token: l.token || this.appId
                                }),
                                s
                            );
                        case y.SetSourceUserId:
                            return (
                                (l = t.getSrcChannelMediaInfo()),
                                (s.clientRequest = {
                                    command: "SetSourceUserId",
                                    uid: this.uid + ""
                                }),
                                s
                            );
                        case y.SetDestChannel:
                            return (
                                (o = t.getDestChannelMediaInfos()),
                                o.forEach(e => {
                                    i.push(e.channelName),
                                        n.push(e.uid + ""),
                                        r.push(e.token || this.appId);
                                }),
                                (s.clientRequest = {
                                    command: "SetDestChannel",
                                    channelName: i,
                                    uid: n,
                                    token: r
                                }),
                                s
                            );
                        case y.StartPacketTransfer:
                            return (
                                (s.clientRequest = {
                                    command: "StartPacketTransfer"
                                }),
                                s
                            );
                        case y.Reconnect:
                            return (
                                (s.clientRequest = {
                                    command: "Reconnect"
                                }),
                                s
                            );
                        case y.StopPacketTransfer:
                            return (
                                (s.clientRequest = {
                                    command: "StopPacketTransfer"
                                }),
                                s
                            );
                        case y.UpdateDestChannel:
                            return (
                                (o = t.getDestChannelMediaInfos()),
                                o.forEach(e => {
                                    i.push(e.channelName),
                                        n.push(e.uid + ""),
                                        r.push(e.token || this.appId);
                                }),
                                (s.clientRequest = {
                                    command: "UpdateDestChannel",
                                    channelName: i,
                                    uid: n,
                                    token: r
                                }),
                                s
                            );
                    }
                }
                _checkSignal() {
                    if (!this._signal || !this._signal.isConnect())
                        throw new d(f.WS_DISCONNECTED);
                }
            }
            t.default = p;
            t.ChannelMediaRelayConfiguration = class {
                constructor() {
                    this.destChannelMediaInfos = new Map();
                }
                setSrcChannelInfo(e) {
                    l.checkValidObject(e, "srcInfo");
                    const { uid: t, channelName: i, token: n } = e;
                    if (n && !l.isValidToken(n))
                        throw new Error("Invalid token in SrcChannelInfo");
                    if (!l.isValidChannelName(i))
                        throw new Error(
                            "Invalid channelName in SrcChannelInfo"
                        );
                    if (!u.is32Uint(t))
                        throw new Error("Invalid uid in SrcChannelInfo");
                    o.default.debug("[setSrcChannelInfo]: srcInfo: ", e),
                        (this.srcChannelMediaInfo = e);
                }
                setDestChannelInfo(e, t) {
                    if (!l.isValidChannelName(e))
                        throw new Error(
                            "Invalid channelName in DestChannelInfo"
                        );
                    l.checkValidObject(t, "destInfo");
                    const { uid: i, token: n } = t,
                        r = t.channelName;
                    if (n && !l.isValidToken(n))
                        throw new Error("Invalid token in DestChannelInfo");
                    if (!l.isValidChannelName(r))
                        throw new Error(
                            "Invalid channelName in DestChannelInfo"
                        );
                    if (!u.is32Uint(i))
                        throw new Error("Invalid uid in DestChannelInfo");
                    o.default.debug(
                        "[setDestChannelInfo]: destInfo: ",
                        t,
                        "channelName: ",
                        e
                    ),
                        this.destChannelMediaInfos.set(e, t);
                }
                removeDestChannelInfo(e) {
                    if (!l.isValidChannelName(e))
                        throw new Error(
                            "Invalid channelName when invoke removeDestChannelInfo"
                        );
                    o.default.debug(
                        "[removeDestChannelInfo]: channelName: ",
                        e
                    ),
                        this.destChannelMediaInfos.delete(e);
                }
                getSrcChannelMediaInfo() {
                    return this.srcChannelMediaInfo;
                }
                getDestChannelMediaInfos() {
                    return this.destChannelMediaInfos;
                }
            };
            class h extends s.default {
                constructor(e, t, i, n) {
                    super(),
                        (this._onOpen = () => {
                            o.default.debug("[ChannelMediaRelay] onOpen"),
                                this.emit("open");
                        }),
                        (this._onClose = e => {
                            o.default.debug("[ChannelMediaRelay] onClose"),
                                this.emit("close"),
                                this.dispose();
                        }),
                        (this._onMessage = e => {
                            o.default.blind(
                                "ChannelMediaRelay receive message",
                                e
                            );
                            const t = JSON.parse(e.data);
                            if (
                                !t ||
                                "serverResponse" !== t.command ||
                                !t.requestId
                            )
                                return t &&
                                    "serverStatus" === t.command &&
                                    t.serverStatus &&
                                    t.serverStatus.command
                                    ? (this.emit("status", t.serverStatus),
                                      void this.emit(
                                          t.serverStatus.command,
                                          t.serverStatus
                                      ))
                                    : void 0;
                            this.emit("req_" + t.requestId, t);
                        }),
                        (this._requestId = 1),
                        (this.appId = e),
                        (this.cname = t),
                        (this.uid = i),
                        (this.sid = n);
                }
                isConnect() {
                    return this._ws && 1 === this._ws.readyState;
                }
                sendMessage(e) {
                    if (!this._ws || 1 !== this._ws.readyState)
                        throw new d(f.WS_DISCONNECTED);
                    const t = this._requestId++;
                    return (
                        (e.requestId = t),
                        (e.seq = t),
                        this._ws.send({
                            data: JSON.stringify(e)
                        }),
                        t
                    );
                }
                waitStatus(e) {
                    return new Promise((t, i) => {
                        const n = setTimeout(() => {
                            i(new d(f.WAIT_STATUS_TIMEOUT, e));
                        }, 5e3);
                        this.once(e, r => {
                            clearTimeout(n),
                                r.state && 0 !== r.state
                                    ? i(new d(f.WAIT_STATUS_ERROR, e))
                                    : t();
                        }),
                            this.once("dispose", () => {
                                clearTimeout(n), i(new d(f.WS_ABORT));
                            });
                    });
                }
                request(e) {
                    return new Promise((t, i) => {
                        const n = this.sendMessage(e),
                            r = setTimeout(() => {
                                this.removeAllListeners("req_" + n),
                                    i(new d(f.REQUEST_TIMEOUT));
                            }, 3e3);
                        this.once("req_" + n, e => {
                            clearTimeout(r),
                                e && 200 === e.code
                                    ? t(e)
                                    : i(new d(f.REQUEST_FAILED, e));
                        }),
                            this.once("dispose", () => {
                                clearTimeout(r), i(new d(f.WS_ABORT));
                            });
                    });
                }
                connect(e) {
                    return new Promise((t, i) => {
                        (this._ws = wx.connectSocket({
                            url: e
                        })),
                            this._ws.onOpen((i, n) => {
                                o.default.debug(
                                    "[ChannelMediaRelay] ws.onOpen"
                                ),
                                    this._onOpen(),
                                    (this._prvUrl = e),
                                    this._ws.onMessage(this._onMessage),
                                    this._ws.onClose(this._onClose),
                                    this._startHeartBeatCheck(),
                                    t();
                            }),
                            this._ws.onClose(e => {
                                o.default.debug(
                                    "[ChannelMediaRelay] ws.onClose",
                                    e
                                ),
                                    this.dispose(),
                                    i(
                                        new d(
                                            f.CONNECT_FAILED,
                                            "websocket error code: " + e.code
                                        )
                                    );
                            }),
                            setTimeout(() => {
                                this._ws &&
                                    1 !== this._ws.readyState &&
                                    (this._ws.onMessage(c),
                                    this._ws.onClose(c),
                                    this._ws.close(),
                                    (this._ws = null),
                                    i(new d(f.CONNECT_TIMEOUT)));
                            }, 5e3),
                            this.once("dispose", () => {
                                i(new d(f.WS_ABORT));
                            });
                    });
                }
                dispose() {
                    o.default.debug("[ChannelMediaRelay] dispose"),
                        this._clearHeartBeatCheck(),
                        this.emit("dispose"),
                        this.removeEvent(),
                        this._ws &&
                            (this._ws.onOpen(c),
                            this._ws.onClose(c),
                            this._ws.onMessage(c),
                            this._ws.close(c)),
                        (this._ws = null);
                }
                _sendPing(e) {
                    if (!this._ws || 1 !== this._ws.readyState)
                        throw new d(f.WS_DISCONNECTED);
                    const t = this._requestId++;
                    return (
                        (e.requestId = t),
                        this._ws.send({
                            data: JSON.stringify(e)
                        }),
                        t
                    );
                }
                _startHeartBeatCheck() {
                    this._heartBeatTimer = setInterval(() => {
                        this._sendPing({
                            command: "ping",
                            appId: this.appId,
                            cname: this.cname,
                            uid: this.uid + "",
                            sid: this.sid,
                            ts: +new Date(),
                            requestId: 0
                        });
                    }, 3e3);
                }
                _clearHeartBeatCheck() {
                    clearInterval(this._heartBeatTimer);
                }
            }
            class d {
                constructor(e = "", t, i) {
                    (this.code = i), (this.data = t), (this.message = e);
                }
            }
            var f, y, g, v, w;
            (t.ChannelMediaError = d),
                (function(e) {
                    (e.CONNECT_FAILED = "connect failed"),
                        (e.CONNECT_TIMEOUT = "connect timeout"),
                        (e.WS_DISCONNECTED = "websocket disconnected"),
                        (e.REQUEST_TIMEOUT = "request timeout"),
                        (e.REQUEST_FAILED = "request failed"),
                        (e.WAIT_STATUS_TIMEOUT = "wait status timeout"),
                        (e.WAIT_STATUS_ERROR = "wait status error"),
                        (e.BAD_STATE = "bad state"),
                        (e.WS_ABORT = "ws abort"),
                        (e.AP_REQUEST_TIMEOUT = "AP request timeout"),
                        (e.AP_JSON_PARSE_ERROR = "AP json parse error"),
                        (e.AP_REQUEST_ERROR = "AP request error"),
                        (e.AP_REQUEST_ABORT = "AP request abort");
                })((f = t.CHANNEL_MEDIA_ERROR || (t.CHANNEL_MEDIA_ERROR = {}))),
                (function(e) {
                    (e[(e.SetSdkProfile = 0)] = "SetSdkProfile"),
                        (e[(e.SetSourceChannel = 1)] = "SetSourceChannel"),
                        (e[(e.SetSourceUserId = 2)] = "SetSourceUserId"),
                        (e[(e.SetDestChannel = 3)] = "SetDestChannel"),
                        (e[(e.StartPacketTransfer = 4)] =
                            "StartPacketTransfer"),
                        (e[(e.StopPacketTransfer = 5)] = "StopPacketTransfer"),
                        (e[(e.UpdateDestChannel = 6)] = "UpdateDestChannel"),
                        (e[(e.Reconnect = 7)] = "Reconnect"),
                        (e[(e.SetVideoProfile = 8)] = "SetVideoProfile");
                })(y || (y = {})),
                (function(e) {
                    (e[(e.NETWORK_DISCONNECTED = 0)] = "NETWORK_DISCONNECTED"),
                        (e[(e.NETWORK_CONNECTED = 1)] = "NETWORK_CONNECTED"),
                        (e[(e.PACKET_JOINED_SRC_CHANNEL = 2)] =
                            "PACKET_JOINED_SRC_CHANNEL"),
                        (e[(e.PACKET_JOINED_DEST_CHANNEL = 3)] =
                            "PACKET_JOINED_DEST_CHANNEL"),
                        (e[(e.PACKET_SENT_TO_DEST_CHANNEL = 4)] =
                            "PACKET_SENT_TO_DEST_CHANNEL"),
                        (e[(e.PACKET_RECEIVED_VIDEO_FROM_SRC = 5)] =
                            "PACKET_RECEIVED_VIDEO_FROM_SRC"),
                        (e[(e.PACKET_RECEIVED_AUDIO_FROM_SRC = 6)] =
                            "PACKET_RECEIVED_AUDIO_FROM_SRC"),
                        (e[(e.PACKET_UPDATE_DEST_CHANNEL = 7)] =
                            "PACKET_UPDATE_DEST_CHANNEL"),
                        (e[(e.PACKET_UPDATE_DEST_CHANNEL_REFUSED = 8)] =
                            "PACKET_UPDATE_DEST_CHANNEL_REFUSED"),
                        (e[(e.PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = 9)] =
                            "PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE");
                })(
                    (g =
                        t.CHANNEL_MEDIA_RELAY_EVENT ||
                        (t.CHANNEL_MEDIA_RELAY_EVENT = {}))
                ),
                (function(e) {
                    (e[(e.RELAY_STATE_IDLE = 0)] = "RELAY_STATE_IDLE"),
                        (e[(e.RELAY_STATE_CONNECTING = 1)] =
                            "RELAY_STATE_CONNECTING"),
                        (e[(e.RELAY_STATE_RUNNING = 2)] =
                            "RELAY_STATE_RUNNING"),
                        (e[(e.RELAY_STATE_FAILURE = 3)] =
                            "RELAY_STATE_FAILURE");
                })(
                    (v =
                        t.CHANNEL_MEDIA_RELAY_STATE ||
                        (t.CHANNEL_MEDIA_RELAY_STATE = {}))
                ),
                (function(e) {
                    (e[(e.RELAY_OK = 0)] = "RELAY_OK"),
                        (e[(e.SERVER_ERROR_RESPONSE = 1)] =
                            "SERVER_ERROR_RESPONSE"),
                        (e[(e.SERVER_NO_RESPONSE = 2)] = "SERVER_NO_RESPONSE"),
                        (e[(e.NO_RESOURCE_AVAILABLE = 3)] =
                            "NO_RESOURCE_AVAILABLE"),
                        (e[(e.FAILED_JOIN_SRC = 4)] = "FAILED_JOIN_SRC"),
                        (e[(e.FAILED_JOIN_DEST = 5)] = "FAILED_JOIN_DEST"),
                        (e[(e.FAILED_PACKET_RECEIVED_FROM_SRC = 6)] =
                            "FAILED_PACKET_RECEIVED_FROM_SRC"),
                        (e[(e.FAILED_PACKET_SENT_TO_DEST = 7)] =
                            "FAILED_PACKET_SENT_TO_DEST"),
                        (e[(e.SERVER_CONNECTION_LOST = 8)] =
                            "SERVER_CONNECTION_LOST"),
                        (e[(e.INTERNAL_ERROR = 9)] = "INTERNAL_ERROR"),
                        (e[(e.SRC_TOKEN_EXPIRED = 10)] = "SRC_TOKEN_EXPIRED"),
                        (e[(e.DEST_TOKEN_EXPIRED = 11)] = "DEST_TOKEN_EXPIRED"),
                        (e[(e.RELAY_ALREADY_START = 12)] =
                            "RELAY_ALREADY_START"),
                        (e[(e.RELAY_NOT_START = 13)] = "RELAY_NOT_START"),
                        (e[(e.OPERATION_ABORT = 14)] = "OPERATION_ABORT");
                })(
                    (w =
                        t.CHANNEL_MEDIA_RELAY_ERROR ||
                        (t.CHANNEL_MEDIA_RELAY_ERROR = {}))
                );
        },
        function(e, t) {
            (e.exports = function(e, t) {
                if (!(e instanceof t))
                    throw new TypeError("Cannot call a class as a function");
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            function i(e, t) {
                for (var i = 0; i < t.length; i++) {
                    var n = t[i];
                    (n.enumerable = n.enumerable || !1),
                        (n.configurable = !0),
                        "value" in n && (n.writable = !0),
                        Object.defineProperty(e, n.key, n);
                }
            }
            (e.exports = function(e, t, n) {
                return (
                    t && i(e.prototype, t),
                    n && i(e, n),
                    Object.defineProperty(e, "prototype", {
                        writable: !1
                    }),
                    e
                );
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t, i) {
            "use strict";

            i.r(t),
                i.d(t, "VERSION", function() {
                    return n;
                }),
                i.d(t, "SDK_VERSION", function() {
                    return r;
                }),
                i.d(t, "DOMAIN_NAME", function() {
                    return s;
                });
            var n = "1.1.0",
                r = "2.5.7",
                s = "mini-app.broadcastapp.agoraio.cn";
        },
        function(e, t, i) {
            "use strict";

            i.r(t),
                i.d(t, "generateSessionId", function() {
                    return a;
                }),
                i.d(t, "shouldUseHttps", function() {
                    return o;
                }),
                i.d(t, "random", function() {
                    return s;
                }),
                i.d(t, "isWeiXin", function() {
                    return l;
                }),
                i.d(t, "is32Uint", function() {
                    return u;
                });
            var n = i(20),
                r = i.n(n),
                s = function(e) {
                    isNaN(e) && (e = 1e3);
                    var t = +new Date(),
                        i = (t = (9301 * t + 49297) % 233280) / 233280;
                    return Math.ceil(i * e);
                },
                a = function() {
                    return r()()
                        .replace(/-/g, "")
                        .toUpperCase();
                },
                o = function() {
                    return "https:" == document.location.protocol;
                },
                l = function() {
                    try {
                        return wx, !0;
                    } catch (e) {
                        return !1;
                    }
                },
                u = function(e) {
                    return !!(0 <= e && e <= 4294967295);
                };
        },
        function(e, t, i) {
            "use strict";

            i.r(t),
                i.d(t, "checkValidObject", function() {
                    return a;
                }),
                i.d(t, "checkValidString", function() {
                    return o;
                }),
                i.d(t, "checkValidNumber", function() {
                    return l;
                }),
                i.d(t, "checkValidFloatNumber", function() {
                    return u;
                }),
                i.d(t, "checkValidBoolean", function() {
                    return c;
                }),
                i.d(t, "checkValidEnum", function() {
                    return s;
                }),
                i.d(t, "isValidString", function() {
                    return p;
                }),
                i.d(t, "isValidNumber", function() {
                    return h;
                }),
                i.d(t, "isValidBoolean", function() {
                    return f;
                }),
                i.d(t, "isASCII", function() {
                    return v;
                }),
                i.d(t, "isInteger", function() {
                    return w;
                }),
                i.d(t, "isNumber", function() {
                    return m;
                }),
                i.d(t, "isString", function() {
                    return _;
                }),
                i.d(t, "isArray", function() {
                    return S;
                }),
                i.d(t, "isEmpty", function() {
                    return T;
                }),
                i.d(t, "isValidToken", function() {
                    return y;
                }),
                i.d(t, "isValidChannelName", function() {
                    return g;
                });
            var n = i(10),
                r = i.n(n),
                s = function(e, t, i) {
                    for (var n = 0; n < i.length; n++)
                        if (e === i[n]) return !0;
                    throw new Error(
                        ""
                            .concat(t, " can only be set as ")
                            .concat(JSON.stringify(i))
                    );
                },
                a = function(e, t) {
                    if (!e)
                        throw new Error(
                            "Invalid param: ".concat(
                                t || "param",
                                " cannot be empty"
                            )
                        );
                    if ("object" !== r()(e))
                        throw new Error(
                            "".concat(
                                t || "This paramter",
                                " is of the object type"
                            )
                        );
                    return !0;
                },
                o = function(e, t, i, n, r) {
                    if (
                        (T(i) && (i = 1),
                        (n = n || 255),
                        T(r) && (r = !0),
                        T(e))
                    )
                        throw new Error(
                            "".concat(t || "param", " cannot be empty")
                        );
                    if (!p(e, i, n, r))
                        throw new Error(
                            "Invalid "
                                .concat(
                                    t || "string param",
                                    ": Length of the string: ["
                                )
                                .concat(i, ",")
                                .concat(n, "].")
                                .concat(r ? " ASCII characters only." : "")
                        );
                },
                l = function(e, t, i, n) {
                    if ((T(i) && (i = 1), (n = n || 1e4), T(e)))
                        throw new Error(
                            "".concat(t || "param", " cannot be empty")
                        );
                    if (!h(e, i, n))
                        throw new Error(
                            "Invalid "
                                .concat(
                                    t || "number param",
                                    ": The value range is ["
                                )
                                .concat(i, ",")
                                .concat(n, "]. integer only")
                        );
                },
                u = function(e, t, i, n) {
                    if (null == e)
                        throw new Error(
                            "".concat(t || "param", " cannot be null")
                        );
                    if ((T(i) && (i = 0), (n = n || 1e4), T(e)))
                        throw new Error(
                            "".concat(t || "param", " cannot be empty")
                        );
                    if (!d(e, i, n))
                        throw new Error(
                            "Invalid "
                                .concat(
                                    t || "number param",
                                    ": The value range is ["
                                )
                                .concat(i, ",")
                                .concat(n, "].")
                        );
                },
                c = function(e, t) {
                    if (T(e))
                        throw new Error(
                            "".concat(t || "param", " cannot be empty")
                        );
                    if (!f(e))
                        throw new Error(
                            "Invalid ".concat(
                                t || "boolean param",
                                ": The value is of the boolean type."
                            )
                        );
                },
                p = function(e, t, i, n) {
                    return (
                        t || (t = 0),
                        i || (i = Number.MAX_SAFE_INTEGER),
                        T(n) && (n = !0),
                        _(e) && (!n || v(e)) && e.length >= t && e.length <= i
                    );
                },
                h = function(e, t, i) {
                    return w(e) && e >= t && e <= i;
                },
                d = function(e, t, i) {
                    return m(e) && e >= t && e <= i;
                },
                f = function(e) {
                    return "boolean" == typeof e;
                },
                y = function(e) {
                    return p(e, 1, 2047);
                },
                g = function(e) {
                    return (
                        _(e) &&
                        /^[a-zA-Z0-9 \!\#\$\%\&\(\)\+\-\:\;\<\=\.\>\?\@\[\]\^\_\{\}\|\~\,]{1,64}$/.test(
                            e
                        )
                    );
                },
                v = function(e) {
                    if ("string" == typeof e) {
                        for (var t = 0; t < e.length; t++) {
                            var i = e.charCodeAt(t);
                            if (i < 0 || i > 255) return !1;
                        }
                        return !0;
                    }
                },
                w = function(e) {
                    return "number" == typeof e && e % 1 == 0;
                },
                m = function(e) {
                    return "number" == typeof e;
                },
                _ = function(e) {
                    return "string" == typeof e;
                },
                S = function(e) {
                    return e instanceof Array;
                },
                T = function(e) {
                    return null == e;
                };
        },
        function(e, t, i) {
            "use strict";

            (function(e) {
                var n = t;
                function r(e, t, i) {
                    for (var n = Object.keys(t), r = 0; r < n.length; ++r)
                        (void 0 !== e[n[r]] && i) || (e[n[r]] = t[n[r]]);
                    return e;
                }
                function s(e) {
                    function t(e, i) {
                        if (!(this instanceof t)) return new t(e, i);
                        Object.defineProperty(this, "message", {
                            get: function() {
                                return e;
                            }
                        }),
                            Error.captureStackTrace
                                ? Error.captureStackTrace(this, t)
                                : Object.defineProperty(this, "stack", {
                                      value: new Error().stack || ""
                                  }),
                            i && r(this, i);
                    }
                    return (
                        ((t.prototype = Object.create(
                            Error.prototype
                        )).constructor = t),
                        Object.defineProperty(t.prototype, "name", {
                            get: function() {
                                return e;
                            }
                        }),
                        (t.prototype.toString = function() {
                            return this.name + ": " + this.message;
                        }),
                        t
                    );
                }
                (n.asPromise = i(39)),
                    (n.base64 = i(40)),
                    (n.EventEmitter = i(41)),
                    (n.float = i(42)),
                    (n.inquire = i(43)),
                    (n.utf8 = i(44)),
                    (n.pool = i(45)),
                    (n.LongBits = i(46)),
                    (n.isNode = Boolean(
                        void 0 !== e &&
                            e &&
                            e.process &&
                            e.process.versions &&
                            e.process.versions.node
                    )),
                    (n.global =
                        (n.isNode && e) ||
                        ("undefined" != typeof window && window) ||
                        ("undefined" != typeof self && self) ||
                        this),
                    (n.emptyArray = Object.freeze ? Object.freeze([]) : []),
                    (n.emptyObject = Object.freeze ? Object.freeze({}) : {}),
                    (n.isInteger =
                        Number.isInteger ||
                        function(e) {
                            return (
                                "number" == typeof e &&
                                isFinite(e) &&
                                Math.floor(e) === e
                            );
                        }),
                    (n.isString = function(e) {
                        return "string" == typeof e || e instanceof String;
                    }),
                    (n.isObject = function(e) {
                        return e && "object" == typeof e;
                    }),
                    (n.isset = n.isSet = function(e, t) {
                        var i = e[t];
                        return (
                            !(null == i || !e.hasOwnProperty(t)) &&
                            ("object" != typeof i ||
                                (Array.isArray(i)
                                    ? i.length
                                    : Object.keys(i).length) > 0)
                        );
                    }),
                    (n.Buffer = (function() {
                        try {
                            var e = n.inquire("buffer").Buffer;
                            return e.prototype.utf8Write ? e : null;
                        } catch (e) {
                            return null;
                        }
                    })()),
                    (n._Buffer_from = null),
                    (n._Buffer_allocUnsafe = null),
                    (n.newBuffer = function(e) {
                        return "number" == typeof e
                            ? n.Buffer
                                ? n._Buffer_allocUnsafe(e)
                                : new n.Array(e)
                            : n.Buffer
                            ? n._Buffer_from(e)
                            : "undefined" == typeof Uint8Array
                            ? e
                            : new Uint8Array(e);
                    }),
                    (n.Array =
                        "undefined" != typeof Uint8Array ? Uint8Array : Array),
                    (n.Long =
                        (n.global.dcodeIO && n.global.dcodeIO.Long) ||
                        n.global.Long ||
                        n.inquire("long")),
                    (n.key2Re = /^true|false|0|1$/),
                    (n.key32Re = /^-?(?:0|[1-9][0-9]*)$/),
                    (n.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/),
                    (n.longToHash = function(e) {
                        return e
                            ? n.LongBits.from(e).toHash()
                            : n.LongBits.zeroHash;
                    }),
                    (n.longFromHash = function(e, t) {
                        var i = n.LongBits.fromHash(e);
                        return n.Long
                            ? n.Long.fromBits(i.lo, i.hi, t)
                            : i.toNumber(Boolean(t));
                    }),
                    (n.merge = r),
                    (n.lcFirst = function(e) {
                        return e.charAt(0).toLowerCase() + e.substring(1);
                    }),
                    (n.newError = s),
                    (n.ProtocolError = s("ProtocolError")),
                    (n.oneOfGetter = function(e) {
                        for (var t = {}, i = 0; i < e.length; ++i) t[e[i]] = 1;
                        return function() {
                            for (
                                var e = Object.keys(this), i = e.length - 1;
                                i > -1;
                                --i
                            )
                                if (
                                    1 === t[e[i]] &&
                                    void 0 !== this[e[i]] &&
                                    null !== this[e[i]]
                                )
                                    return e[i];
                        };
                    }),
                    (n.oneOfSetter = function(e) {
                        return function(t) {
                            for (var i = 0; i < e.length; ++i)
                                e[i] !== t && delete this[e[i]];
                        };
                    }),
                    (n.toJSONOptions = {
                        longs: String,
                        enums: String,
                        bytes: String,
                        json: !0
                    }),
                    (n._configure = function() {
                        var e = n.Buffer;
                        e
                            ? ((n._Buffer_from =
                                  (e.from !== Uint8Array.from && e.from) ||
                                  function(t, i) {
                                      return new e(t, i);
                                  }),
                              (n._Buffer_allocUnsafe =
                                  e.allocUnsafe ||
                                  function(t) {
                                      return new e(t);
                                  }))
                            : (n._Buffer_from = n._Buffer_allocUnsafe = null);
                    });
            }.call(this, i(38)));
        },
        function(e, t, i) {
            var n = i(26)();
            e.exports = n;
            try {
                regeneratorRuntime = n;
            } catch (e) {
                "object" == typeof globalThis
                    ? (globalThis.regeneratorRuntime = n)
                    : Function("r", "regeneratorRuntime = r")(n);
            }
        },
        function(module, __webpack_exports__, __webpack_require__) {
            "use strict";

            __webpack_require__.r(__webpack_exports__);
            var Thrift = {
                    Version: "0.11.0",
                    Type: {
                        STOP: 0,
                        VOID: 1,
                        BOOL: 2,
                        BYTE: 3,
                        I08: 3,
                        DOUBLE: 4,
                        I16: 6,
                        I32: 8,
                        I64: 10,
                        STRING: 11,
                        UTF7: 11,
                        STRUCT: 12,
                        MAP: 13,
                        SET: 14,
                        LIST: 15,
                        UTF8: 16,
                        UTF16: 17
                    },
                    MessageType: {
                        CALL: 1,
                        REPLY: 2,
                        EXCEPTION: 3,
                        ONEWAY: 4
                    },
                    objectLength: function(e) {
                        var t = 0;
                        for (var i in e) e.hasOwnProperty(i) && t++;
                        return t;
                    },
                    inherits: function(e, t, i) {
                        function n() {}
                        (n.prototype = t.prototype),
                            (e.prototype = new n()),
                            (e.prototype.name = i || "");
                    }
                },
                _copyList,
                _copyMap;
            (Thrift.TException = function(e) {
                this.message = e;
            }),
                Thrift.inherits(Thrift.TException, Error, "TException"),
                (Thrift.TException.prototype.getMessage = function() {
                    return this.message;
                }),
                (Thrift.TApplicationExceptionType = {
                    UNKNOWN: 0,
                    UNKNOWN_METHOD: 1,
                    INVALID_MESSAGE_TYPE: 2,
                    WRONG_METHOD_NAME: 3,
                    BAD_SEQUENCE_ID: 4,
                    MISSING_RESULT: 5,
                    INTERNAL_ERROR: 6,
                    PROTOCOL_ERROR: 7,
                    INVALID_TRANSFORM: 8,
                    INVALID_PROTOCOL: 9,
                    UNSUPPORTED_CLIENT_TYPE: 10
                }),
                (Thrift.TApplicationException = function(e, t) {
                    (this.message = e),
                        (this.code = "number" == typeof t ? t : 0);
                }),
                Thrift.inherits(
                    Thrift.TApplicationException,
                    Thrift.TException,
                    "TApplicationException"
                ),
                (Thrift.TApplicationException.prototype.read = function(e) {
                    for (;;) {
                        var t = e.readFieldBegin();
                        if (t.ftype == Thrift.Type.STOP) break;
                        switch (t.fid) {
                            case 1:
                                t.ftype == Thrift.Type.STRING
                                    ? ((t = e.readString()),
                                      (this.message = t.value))
                                    : (t = e.skip(t.ftype));
                                break;
                            case 2:
                                t.ftype == Thrift.Type.I32
                                    ? ((t = e.readI32()), (this.code = t.value))
                                    : (t = e.skip(t.ftype));
                                break;
                            default:
                                t = e.skip(t.ftype);
                        }
                        e.readFieldEnd();
                    }
                    e.readStructEnd();
                }),
                (Thrift.TApplicationException.prototype.write = function(e) {
                    e.writeStructBegin("TApplicationException"),
                        this.message &&
                            (e.writeFieldBegin(
                                "message",
                                Thrift.Type.STRING,
                                1
                            ),
                            e.writeString(this.getMessage()),
                            e.writeFieldEnd()),
                        this.code &&
                            (e.writeFieldBegin("type", Thrift.Type.I32, 2),
                            e.writeI32(this.code),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                }),
                (Thrift.TApplicationException.prototype.getCode = function() {
                    return this.code;
                }),
                (Thrift.TProtocolExceptionType = {
                    UNKNOWN: 0,
                    INVALID_DATA: 1,
                    NEGATIVE_SIZE: 2,
                    SIZE_LIMIT: 3,
                    BAD_VERSION: 4,
                    NOT_IMPLEMENTED: 5,
                    DEPTH_LIMIT: 6
                }),
                (Thrift.TProtocolException = function(e, t) {
                    Error.call(this),
                        Error.captureStackTrace(this, this.constructor),
                        (this.name = this.constructor.name),
                        (this.type = e),
                        (this.message = t);
                }),
                Thrift.inherits(
                    Thrift.TProtocolException,
                    Thrift.TException,
                    "TProtocolException"
                ),
                (Thrift.Transport = Thrift.TXHRTransport = function(e, t) {
                    (this.url = e),
                        (this.wpos = 0),
                        (this.rpos = 0),
                        (this.useCORS = t && t.useCORS),
                        (this.customHeaders =
                            t && t.customHeaders ? t.customHeaders : {}),
                        (this.send_buf = ""),
                        (this.recv_buf = "");
                }),
                (Thrift.TXHRTransport.prototype = {
                    getXmlHttpRequestObject: function() {
                        try {
                            return new XMLHttpRequest();
                        } catch (e) {}
                        try {
                            return new ActiveXObject("Msxml2.XMLHTTP");
                        } catch (e) {}
                        try {
                            return new ActiveXObject("Microsoft.XMLHTTP");
                        } catch (e) {}
                        throw "Your browser doesn't support XHR.";
                    },
                    flush: function(e, t) {
                        var i = this;
                        if ((e && !t) || void 0 === this.url || "" === this.url)
                            return this.send_buf;
                        var n,
                            r = {};
                        (r.header = {}),
                            (r.method = "POST"),
                            (r.header.MediaType =
                                "application/vnd.apache.thrift.json; charset=utf-8"),
                            t &&
                                ((r.success =
                                    ((n = t),
                                    function(e) {
                                        if (
                                            ((i.responseText = JSON.stringify(
                                                e.data
                                            )),
                                            i.setRecvBuffer(i.responseText),
                                            e && 200 !== e.statusCode)
                                        )
                                            return n(e.statusCode);
                                        n();
                                    })),
                                (r.fail = (function() {
                                    var e = t;
                                    return function(t) {
                                        e(t);
                                    };
                                })())),
                            Object.keys(i.customHeaders).forEach(function(e) {
                                r.header[e] = i.customHeaders[e];
                            }),
                            (r.header.Accept =
                                "application/vnd.apache.thrift.json; charset=utf-8"),
                            (r.header["Content-Type"] =
                                "application/vnd.apache.thrift.json; charset=utf-8"),
                            (r.data = this.send_buf),
                            (r.url = this.url),
                            wx.request(r);
                    },
                    jqRequest: function(e, t, i, n) {
                        if (
                            "undefined" == typeof jQuery ||
                            void 0 === jQuery.Deferred
                        )
                            throw "Thrift.js requires jQuery 1.5+ to use asynchronous requests";
                        var r = this;
                        return jQuery.ajax({
                            url: this.url,
                            data: t,
                            type: "POST",
                            cache: !1,
                            contentType:
                                "application/vnd.apache.thrift.json; charset=utf-8",
                            dataType: "text thrift",
                            converters: {
                                "text thrift": function(t) {
                                    return r.setRecvBuffer(t), n.call(e);
                                }
                            },
                            context: e,
                            success: jQuery.makeArray(i).pop()
                        });
                    },
                    setRecvBuffer: function(e) {
                        (this.recv_buf = e),
                            (this.recv_buf_sz = this.recv_buf.length),
                            (this.wpos = this.recv_buf.length),
                            (this.rpos = 0);
                    },
                    isOpen: function() {
                        return !0;
                    },
                    open: function() {},
                    close: function() {},
                    read: function(e) {
                        var t = this.wpos - this.rpos;
                        if (0 === t) return "";
                        var i = e;
                        t < e && (i = t);
                        var n = this.read_buf.substr(this.rpos, i);
                        return (this.rpos += i), n;
                    },
                    readAll: function() {
                        return this.recv_buf;
                    },
                    write: function(e) {
                        this.send_buf = e;
                    },
                    getSendBuffer: function() {
                        return this.send_buf;
                    }
                }),
                (Thrift.TWebSocketTransport = function(e) {
                    this.__reset(e);
                }),
                (Thrift.TWebSocketTransport.prototype = {
                    __reset: function(e) {
                        (this.url = e),
                            (this.socket = null),
                            (this.callbacks = []),
                            (this.send_pending = []),
                            (this.send_buf = ""),
                            (this.recv_buf = ""),
                            (this.rb_wpos = 0),
                            (this.rb_rpos = 0);
                    },
                    flush: function(e, t) {
                        var i,
                            n = this;
                        this.isOpen()
                            ? (this.socket.send(this.send_buf),
                              this.callbacks.push(
                                  ((i = t),
                                  function(e) {
                                      n.setRecvBuffer(e), i();
                                  })
                              ),
                              t &&
                                  this.callbacks.push(
                                      (function() {
                                          var e = t;
                                          return function(t) {
                                              n.setRecvBuffer(t), e();
                                          };
                                      })()
                                  ))
                            : this.send_pending.push({
                                  buf: this.send_buf,
                                  cb: t
                              });
                    },
                    __onOpen: function() {
                        var e = this;
                        this.send_pending.length > 0 &&
                            (this.send_pending.forEach(function(t) {
                                var i;
                                this.socket.send(t.buf),
                                    this.callbacks.push(
                                        ((i = t.cb),
                                        function(t) {
                                            e.setRecvBuffer(t), i();
                                        })
                                    );
                            }),
                            (this.send_pending = []));
                    },
                    __onClose: function(e) {
                        this.__reset(this.url);
                    },
                    __onMessage: function(e) {
                        this.callbacks.length && this.callbacks.shift()(e.data);
                    },
                    __onError: function(e) {
                        console.log("Thrift WebSocket Error: " + e.toString()),
                            this.socket.close();
                    },
                    setRecvBuffer: function(e) {
                        (this.recv_buf = e),
                            (this.recv_buf_sz = this.recv_buf.length),
                            (this.wpos = this.recv_buf.length),
                            (this.rpos = 0);
                    },
                    isOpen: function() {
                        return (
                            this.socket &&
                            this.socket.readyState == this.socket.OPEN
                        );
                    },
                    open: function() {
                        (this.socket &&
                            this.socket.readyState != this.socket.CLOSED) ||
                            ((this.socket = new WebSocket(this.url)),
                            (this.socket.onopen = this.__onOpen.bind(this)),
                            (this.socket.onmessage = this.__onMessage.bind(
                                this
                            )),
                            (this.socket.onerror = this.__onError.bind(this)),
                            (this.socket.onclose = this.__onClose.bind(this)));
                    },
                    close: function() {
                        this.socket.close();
                    },
                    read: function(e) {
                        var t = this.wpos - this.rpos;
                        if (0 === t) return "";
                        var i = e;
                        t < e && (i = t);
                        var n = this.read_buf.substr(this.rpos, i);
                        return (this.rpos += i), n;
                    },
                    readAll: function() {
                        return this.recv_buf;
                    },
                    write: function(e) {
                        this.send_buf = e;
                    },
                    getSendBuffer: function() {
                        return this.send_buf;
                    }
                }),
                (Thrift.TJSONProtocol = Thrift.Protocol = function(e) {
                    (this.tstack = []), (this.tpos = []), (this.transport = e);
                }),
                (Thrift.Protocol.Type = {}),
                (Thrift.Protocol.Type[Thrift.Type.BOOL] = '"tf"'),
                (Thrift.Protocol.Type[Thrift.Type.BYTE] = '"i8"'),
                (Thrift.Protocol.Type[Thrift.Type.I16] = '"i16"'),
                (Thrift.Protocol.Type[Thrift.Type.I32] = '"i32"'),
                (Thrift.Protocol.Type[Thrift.Type.I64] = '"i64"'),
                (Thrift.Protocol.Type[Thrift.Type.DOUBLE] = '"dbl"'),
                (Thrift.Protocol.Type[Thrift.Type.STRUCT] = '"rec"'),
                (Thrift.Protocol.Type[Thrift.Type.STRING] = '"str"'),
                (Thrift.Protocol.Type[Thrift.Type.MAP] = '"map"'),
                (Thrift.Protocol.Type[Thrift.Type.LIST] = '"lst"'),
                (Thrift.Protocol.Type[Thrift.Type.SET] = '"set"'),
                (Thrift.Protocol.RType = {}),
                (Thrift.Protocol.RType.tf = Thrift.Type.BOOL),
                (Thrift.Protocol.RType.i8 = Thrift.Type.BYTE),
                (Thrift.Protocol.RType.i16 = Thrift.Type.I16),
                (Thrift.Protocol.RType.i32 = Thrift.Type.I32),
                (Thrift.Protocol.RType.i64 = Thrift.Type.I64),
                (Thrift.Protocol.RType.dbl = Thrift.Type.DOUBLE),
                (Thrift.Protocol.RType.rec = Thrift.Type.STRUCT),
                (Thrift.Protocol.RType.str = Thrift.Type.STRING),
                (Thrift.Protocol.RType.map = Thrift.Type.MAP),
                (Thrift.Protocol.RType.lst = Thrift.Type.LIST),
                (Thrift.Protocol.RType.set = Thrift.Type.SET),
                (Thrift.Protocol.Version = 1),
                (Thrift.Protocol.prototype = {
                    getTransport: function() {
                        return this.transport;
                    },
                    writeMessageBegin: function(e, t, i) {
                        (this.tstack = []),
                            (this.tpos = []),
                            this.tstack.push([
                                Thrift.Protocol.Version,
                                '"' + e + '"',
                                t,
                                i
                            ]);
                    },
                    writeMessageEnd: function() {
                        var e = this.tstack.pop();
                        (this.wobj = this.tstack.pop()),
                            this.wobj.push(e),
                            (this.wbuf = "[" + this.wobj.join(",") + "]"),
                            this.transport.write(this.wbuf);
                    },
                    writeStructBegin: function(e) {
                        this.tpos.push(this.tstack.length),
                            this.tstack.push({});
                    },
                    writeStructEnd: function() {
                        var e = this.tpos.pop(),
                            t = this.tstack[e],
                            i = "{",
                            n = !0;
                        for (var r in t)
                            n ? (n = !1) : (i += ","), (i += r + ":" + t[r]);
                        (i += "}"), (this.tstack[e] = i);
                    },
                    writeFieldBegin: function(e, t, i) {
                        this.tpos.push(this.tstack.length),
                            this.tstack.push({
                                fieldId: '"' + i + '"',
                                fieldType: Thrift.Protocol.Type[t]
                            });
                    },
                    writeFieldEnd: function() {
                        var e = this.tstack.pop(),
                            t = this.tstack.pop();
                        (this.tstack[this.tstack.length - 1][t.fieldId] =
                            "{" + t.fieldType + ":" + e + "}"),
                            this.tpos.pop();
                    },
                    writeFieldStop: function() {},
                    writeMapBegin: function(e, t, i) {
                        this.tpos.push(this.tstack.length),
                            this.tstack.push([
                                Thrift.Protocol.Type[e],
                                Thrift.Protocol.Type[t],
                                0
                            ]);
                    },
                    writeMapEnd: function() {
                        var e = this.tpos.pop();
                        if (e != this.tstack.length) {
                            (this.tstack.length - e - 1) % 2 != 0 &&
                                this.tstack.push("");
                            var t = (this.tstack.length - e - 1) / 2;
                            this.tstack[e][this.tstack[e].length - 1] = t;
                            for (
                                var i = "}", n = !0;
                                this.tstack.length > e + 1;

                            ) {
                                var r = this.tstack.pop(),
                                    s = this.tstack.pop();
                                n ? (n = !1) : (i = "," + i),
                                    isNaN(s) || (s = '"' + s + '"'),
                                    (i = s + ":" + r + i);
                            }
                            (i = "{" + i),
                                this.tstack[e].push(i),
                                (this.tstack[e] =
                                    "[" + this.tstack[e].join(",") + "]");
                        }
                    },
                    writeListBegin: function(e, t) {
                        this.tpos.push(this.tstack.length),
                            this.tstack.push([Thrift.Protocol.Type[e], t]);
                    },
                    writeListEnd: function() {
                        for (
                            var e = this.tpos.pop();
                            this.tstack.length > e + 1;

                        ) {
                            var t = this.tstack[e + 1];
                            this.tstack.splice(e + 1, 1),
                                this.tstack[e].push(t);
                        }
                        this.tstack[e] = "[" + this.tstack[e].join(",") + "]";
                    },
                    writeSetBegin: function(e, t) {
                        this.tpos.push(this.tstack.length),
                            this.tstack.push([Thrift.Protocol.Type[e], t]);
                    },
                    writeSetEnd: function() {
                        for (
                            var e = this.tpos.pop();
                            this.tstack.length > e + 1;

                        ) {
                            var t = this.tstack[e + 1];
                            this.tstack.splice(e + 1, 1),
                                this.tstack[e].push(t);
                        }
                        this.tstack[e] = "[" + this.tstack[e].join(",") + "]";
                    },
                    writeBool: function(e) {
                        this.tstack.push(e ? 1 : 0);
                    },
                    writeByte: function(e) {
                        this.tstack.push(e);
                    },
                    writeI16: function(e) {
                        this.tstack.push(e);
                    },
                    writeI32: function(e) {
                        this.tstack.push(e);
                    },
                    writeI64: function(e) {
                        this.tstack.push(e);
                    },
                    writeDouble: function(e) {
                        this.tstack.push(e);
                    },
                    writeString: function(e) {
                        if (null === e) this.tstack.push(null);
                        else {
                            for (var t = "", i = 0; i < e.length; i++) {
                                var n = e.charAt(i);
                                t +=
                                    '"' === n
                                        ? '\\"'
                                        : "\\" === n
                                        ? "\\\\"
                                        : "\b" === n
                                        ? "\\b"
                                        : "\f" === n
                                        ? "\\f"
                                        : "\n" === n
                                        ? "\\n"
                                        : "\r" === n
                                        ? "\\r"
                                        : "\t" === n
                                        ? "\\t"
                                        : n;
                            }
                            this.tstack.push('"' + t + '"');
                        }
                    },
                    writeBinary: function(e) {
                        var t = "";
                        if ("string" == typeof e) t = e;
                        else {
                            if (!(e instanceof Uint8Array))
                                throw new TypeError(
                                    "writeBinary only accepts String or Uint8Array."
                                );
                            for (var i = e, n = 0; n < i.length; ++n)
                                t += String.fromCharCode(i[n]);
                        }
                        this.tstack.push('"' + btoa(t) + '"');
                    },
                    readMessageBegin: function readMessageBegin() {
                        if (
                            ((this.rstack = []),
                            (this.rpos = []),
                            "undefined" != typeof JSON &&
                                "function" == typeof JSON.parse)
                        ) {
                            var a = this.transport.readAll();
                            this.robj = JSON.parse(a);
                        } else
                            "undefined" != typeof jQuery
                                ? (this.robj = jQuery.parseJSON(
                                      this.transport.readAll()
                                  ))
                                : (this.robj = eval(this.transport.readAll()));
                        this.robj instanceof Array == 0 &&
                            (this.robj = [this.robj]);
                        var r = {},
                            version = this.robj.shift();
                        if (version != Thrift.Protocol.Version)
                            throw "Wrong thrift protocol version: " + version;
                        return (
                            (r.fname = this.robj.shift()),
                            (r.mtype = this.robj.shift()),
                            (r.rseqid = this.robj.shift()),
                            this.rstack.push(this.robj.shift()),
                            r
                        );
                    },
                    readMessageEnd: function() {},
                    readStructBegin: function(e) {
                        var t = {
                            fname: ""
                        };
                        return (
                            this.rstack[this.rstack.length - 1] instanceof
                                Array &&
                                this.rstack.push(
                                    this.rstack[this.rstack.length - 1].shift()
                                ),
                            t
                        );
                    },
                    readStructEnd: function() {
                        this.rstack[this.rstack.length - 2] instanceof Array &&
                            this.rstack.pop();
                    },
                    readFieldBegin: function() {
                        var e = {},
                            t = -1,
                            i = Thrift.Type.STOP;
                        for (var n in this.rstack[this.rstack.length - 1])
                            if (null !== n) {
                                (t = parseInt(n, 10)),
                                    this.rpos.push(this.rstack.length);
                                var r = this.rstack[this.rstack.length - 1][t];
                                delete this.rstack[this.rstack.length - 1][t],
                                    this.rstack.push(r);
                                break;
                            }
                        if (-1 != t)
                            for (var s in this.rstack[this.rstack.length - 1])
                                null !== Thrift.Protocol.RType[s] &&
                                    ((i = Thrift.Protocol.RType[s]),
                                    (this.rstack[
                                        this.rstack.length - 1
                                    ] = this.rstack[this.rstack.length - 1][
                                        s
                                    ]));
                        return (e.fname = ""), (e.ftype = i), (e.fid = t), e;
                    },
                    readFieldEnd: function() {
                        for (var e = this.rpos.pop(); this.rstack.length > e; )
                            this.rstack.pop();
                    },
                    readMapBegin: function() {
                        var e = this.rstack.pop(),
                            t = e.shift();
                        t instanceof Array &&
                            (this.rstack.push(e), (t = (e = t).shift()));
                        var i = {};
                        return (
                            (i.ktype = Thrift.Protocol.RType[t]),
                            (i.vtype = Thrift.Protocol.RType[e.shift()]),
                            (i.size = e.shift()),
                            this.rpos.push(this.rstack.length),
                            this.rstack.push(e.shift()),
                            i
                        );
                    },
                    readMapEnd: function() {
                        this.readFieldEnd();
                    },
                    readListBegin: function() {
                        var e = this.rstack[this.rstack.length - 1],
                            t = {};
                        return (
                            (t.etype = Thrift.Protocol.RType[e.shift()]),
                            (t.size = e.shift()),
                            this.rpos.push(this.rstack.length),
                            this.rstack.push(e.shift()),
                            t
                        );
                    },
                    readListEnd: function() {
                        this.readFieldEnd();
                    },
                    readSetBegin: function(e, t) {
                        return this.readListBegin(e, t);
                    },
                    readSetEnd: function() {
                        return this.readListEnd();
                    },
                    readBool: function() {
                        var e = this.readI32();
                        return (
                            null !== e && "1" == e.value
                                ? (e.value = !0)
                                : (e.value = !1),
                            e
                        );
                    },
                    readByte: function() {
                        return this.readI32();
                    },
                    readI16: function() {
                        return this.readI32();
                    },
                    readI32: function(e) {
                        void 0 === e &&
                            (e = this.rstack[this.rstack.length - 1]);
                        var t = {};
                        if (e instanceof Array)
                            0 === e.length
                                ? (t.value = void 0)
                                : (t.value = e.shift());
                        else if (e instanceof Object) {
                            for (var i in e)
                                if (null !== i) {
                                    this.rstack.push(e[i]),
                                        delete e[i],
                                        (t.value = i);
                                    break;
                                }
                        } else (t.value = e), this.rstack.pop();
                        return t;
                    },
                    readI64: function() {
                        return this.readI32();
                    },
                    readDouble: function() {
                        return this.readI32();
                    },
                    readString: function() {
                        return this.readI32();
                    },
                    readBinary: function() {
                        var e = this.readI32();
                        return (e.value = atob(e.value)), e;
                    },
                    skip: function(e) {
                        var t, i;
                        switch (e) {
                            case Thrift.Type.STOP:
                                return null;
                            case Thrift.Type.BOOL:
                                return this.readBool();
                            case Thrift.Type.BYTE:
                                return this.readByte();
                            case Thrift.Type.I16:
                                return this.readI16();
                            case Thrift.Type.I32:
                                return this.readI32();
                            case Thrift.Type.I64:
                                return this.readI64();
                            case Thrift.Type.DOUBLE:
                                return this.readDouble();
                            case Thrift.Type.STRING:
                                return this.readString();
                            case Thrift.Type.STRUCT:
                                for (
                                    this.readStructBegin();
                                    (t = this.readFieldBegin()).ftype !=
                                    Thrift.Type.STOP;

                                )
                                    this.skip(t.ftype), this.readFieldEnd();
                                return this.readStructEnd(), null;
                            case Thrift.Type.MAP:
                                for (
                                    t = this.readMapBegin(), i = 0;
                                    i < t.size;
                                    i++
                                )
                                    i > 0 &&
                                        this.rstack.length >
                                            this.rpos[this.rpos.length - 1] +
                                                1 &&
                                        this.rstack.pop(),
                                        this.skip(t.ktype),
                                        this.skip(t.vtype);
                                return this.readMapEnd(), null;
                            case Thrift.Type.SET:
                                for (
                                    t = this.readSetBegin(), i = 0;
                                    i < t.size;
                                    i++
                                )
                                    this.skip(t.etype);
                                return this.readSetEnd(), null;
                            case Thrift.Type.LIST:
                                for (
                                    t = this.readListBegin(), i = 0;
                                    i < t.size;
                                    i++
                                )
                                    this.skip(t.etype);
                                return this.readListEnd(), null;
                        }
                    }
                }),
                (Thrift.MultiplexProtocol = function(e, t, i, n) {
                    Thrift.Protocol.call(this, t, i, n), (this.serviceName = e);
                }),
                Thrift.inherits(
                    Thrift.MultiplexProtocol,
                    Thrift.Protocol,
                    "multiplexProtocol"
                ),
                (Thrift.MultiplexProtocol.prototype.writeMessageBegin = function(
                    e,
                    t,
                    i
                ) {
                    t === Thrift.MessageType.CALL ||
                    t === Thrift.MessageType.ONEWAY
                        ? Thrift.Protocol.prototype.writeMessageBegin.call(
                              this,
                              this.serviceName + ":" + e,
                              t,
                              i
                          )
                        : Thrift.Protocol.prototype.writeMessageBegin.call(
                              this,
                              e,
                              t,
                              i
                          );
                }),
                (Thrift.Multiplexer = function() {
                    this.seqid = 0;
                }),
                (Thrift.Multiplexer.prototype.createClient = function(e, t, i) {
                    t.Client && (t = t.Client);
                    var n = this;
                    return (
                        (t.prototype.new_seqid = function() {
                            return (n.seqid += 1), n.seqid;
                        }),
                        new t(new Thrift.MultiplexProtocol(e, i))
                    );
                }),
                (_copyList = function(e, t) {
                    if (!e) return e;
                    var i,
                        n,
                        r,
                        s = (i = void 0 === t.shift ? t : t[0]),
                        a = e.length,
                        o = [];
                    for (n = 0; n < a; n++)
                        (r = e[n]),
                            null === i
                                ? o.push(r)
                                : i === _copyMap || i === _copyList
                                ? o.push(i(r, t.slice(1)))
                                : o.push(new s(r));
                    return o;
                }),
                (_copyMap = function(e, t) {
                    if (!e) return e;
                    var i,
                        n,
                        r = (i = void 0 === t.shift ? t : t[0]),
                        s = {};
                    for (var a in e)
                        e.hasOwnProperty(a) &&
                            ((n = e[a]),
                            (s[a] =
                                null === i
                                    ? n
                                    : i === _copyMap || i === _copyList
                                    ? i(n, t.slice(1))
                                    : new r(n)));
                    return s;
                }),
                (Thrift.copyMap = _copyMap),
                (Thrift.copyList = _copyList),
                (__webpack_exports__.default = Thrift);
        },
        function(e, t) {
            function i(t) {
                return (
                    (e.exports = i =
                        "function" == typeof Symbol &&
                        "symbol" == typeof Symbol.iterator
                            ? function(e) {
                                  return typeof e;
                              }
                            : function(e) {
                                  return e &&
                                      "function" == typeof Symbol &&
                                      e.constructor === Symbol &&
                                      e !== Symbol.prototype
                                      ? "symbol"
                                      : typeof e;
                              }),
                    (e.exports.__esModule = !0),
                    (e.exports.default = e.exports),
                    i(t)
                );
            }
            (e.exports = i),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t, i) {
            var n = i(27),
                r = i(28),
                s = i(29),
                a = i(30);
            (e.exports = function(e) {
                return n(e) || r(e) || s(e) || a();
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t, i) {
            var n, r, s, a, o;
            (n = i(31)),
                (r = i(15).utf8),
                (s = i(32)),
                (a = i(15).bin),
                ((o = function(e, t) {
                    e.constructor == String
                        ? (e =
                              t && "binary" === t.encoding
                                  ? a.stringToBytes(e)
                                  : r.stringToBytes(e))
                        : s(e)
                        ? (e = Array.prototype.slice.call(e, 0))
                        : Array.isArray(e) ||
                          e.constructor === Uint8Array ||
                          (e = e.toString());
                    for (
                        var i = n.bytesToWords(e),
                            l = 8 * e.length,
                            u = 1732584193,
                            c = -271733879,
                            p = -1732584194,
                            h = 271733878,
                            d = 0;
                        d < i.length;
                        d++
                    )
                        i[d] =
                            (16711935 & ((i[d] << 8) | (i[d] >>> 24))) |
                            (4278255360 & ((i[d] << 24) | (i[d] >>> 8)));
                    (i[l >>> 5] |= 128 << l % 32),
                        (i[14 + (((l + 64) >>> 9) << 4)] = l);
                    var f = o._ff,
                        y = o._gg,
                        g = o._hh,
                        v = o._ii;
                    for (d = 0; d < i.length; d += 16) {
                        var w = u,
                            m = c,
                            _ = p,
                            S = h;
                        (u = f(u, c, p, h, i[d + 0], 7, -680876936)),
                            (h = f(h, u, c, p, i[d + 1], 12, -389564586)),
                            (p = f(p, h, u, c, i[d + 2], 17, 606105819)),
                            (c = f(c, p, h, u, i[d + 3], 22, -1044525330)),
                            (u = f(u, c, p, h, i[d + 4], 7, -176418897)),
                            (h = f(h, u, c, p, i[d + 5], 12, 1200080426)),
                            (p = f(p, h, u, c, i[d + 6], 17, -1473231341)),
                            (c = f(c, p, h, u, i[d + 7], 22, -45705983)),
                            (u = f(u, c, p, h, i[d + 8], 7, 1770035416)),
                            (h = f(h, u, c, p, i[d + 9], 12, -1958414417)),
                            (p = f(p, h, u, c, i[d + 10], 17, -42063)),
                            (c = f(c, p, h, u, i[d + 11], 22, -1990404162)),
                            (u = f(u, c, p, h, i[d + 12], 7, 1804603682)),
                            (h = f(h, u, c, p, i[d + 13], 12, -40341101)),
                            (p = f(p, h, u, c, i[d + 14], 17, -1502002290)),
                            (u = y(
                                u,
                                (c = f(c, p, h, u, i[d + 15], 22, 1236535329)),
                                p,
                                h,
                                i[d + 1],
                                5,
                                -165796510
                            )),
                            (h = y(h, u, c, p, i[d + 6], 9, -1069501632)),
                            (p = y(p, h, u, c, i[d + 11], 14, 643717713)),
                            (c = y(c, p, h, u, i[d + 0], 20, -373897302)),
                            (u = y(u, c, p, h, i[d + 5], 5, -701558691)),
                            (h = y(h, u, c, p, i[d + 10], 9, 38016083)),
                            (p = y(p, h, u, c, i[d + 15], 14, -660478335)),
                            (c = y(c, p, h, u, i[d + 4], 20, -405537848)),
                            (u = y(u, c, p, h, i[d + 9], 5, 568446438)),
                            (h = y(h, u, c, p, i[d + 14], 9, -1019803690)),
                            (p = y(p, h, u, c, i[d + 3], 14, -187363961)),
                            (c = y(c, p, h, u, i[d + 8], 20, 1163531501)),
                            (u = y(u, c, p, h, i[d + 13], 5, -1444681467)),
                            (h = y(h, u, c, p, i[d + 2], 9, -51403784)),
                            (p = y(p, h, u, c, i[d + 7], 14, 1735328473)),
                            (u = g(
                                u,
                                (c = y(c, p, h, u, i[d + 12], 20, -1926607734)),
                                p,
                                h,
                                i[d + 5],
                                4,
                                -378558
                            )),
                            (h = g(h, u, c, p, i[d + 8], 11, -2022574463)),
                            (p = g(p, h, u, c, i[d + 11], 16, 1839030562)),
                            (c = g(c, p, h, u, i[d + 14], 23, -35309556)),
                            (u = g(u, c, p, h, i[d + 1], 4, -1530992060)),
                            (h = g(h, u, c, p, i[d + 4], 11, 1272893353)),
                            (p = g(p, h, u, c, i[d + 7], 16, -155497632)),
                            (c = g(c, p, h, u, i[d + 10], 23, -1094730640)),
                            (u = g(u, c, p, h, i[d + 13], 4, 681279174)),
                            (h = g(h, u, c, p, i[d + 0], 11, -358537222)),
                            (p = g(p, h, u, c, i[d + 3], 16, -722521979)),
                            (c = g(c, p, h, u, i[d + 6], 23, 76029189)),
                            (u = g(u, c, p, h, i[d + 9], 4, -640364487)),
                            (h = g(h, u, c, p, i[d + 12], 11, -421815835)),
                            (p = g(p, h, u, c, i[d + 15], 16, 530742520)),
                            (u = v(
                                u,
                                (c = g(c, p, h, u, i[d + 2], 23, -995338651)),
                                p,
                                h,
                                i[d + 0],
                                6,
                                -198630844
                            )),
                            (h = v(h, u, c, p, i[d + 7], 10, 1126891415)),
                            (p = v(p, h, u, c, i[d + 14], 15, -1416354905)),
                            (c = v(c, p, h, u, i[d + 5], 21, -57434055)),
                            (u = v(u, c, p, h, i[d + 12], 6, 1700485571)),
                            (h = v(h, u, c, p, i[d + 3], 10, -1894986606)),
                            (p = v(p, h, u, c, i[d + 10], 15, -1051523)),
                            (c = v(c, p, h, u, i[d + 1], 21, -2054922799)),
                            (u = v(u, c, p, h, i[d + 8], 6, 1873313359)),
                            (h = v(h, u, c, p, i[d + 15], 10, -30611744)),
                            (p = v(p, h, u, c, i[d + 6], 15, -1560198380)),
                            (c = v(c, p, h, u, i[d + 13], 21, 1309151649)),
                            (u = v(u, c, p, h, i[d + 4], 6, -145523070)),
                            (h = v(h, u, c, p, i[d + 11], 10, -1120210379)),
                            (p = v(p, h, u, c, i[d + 2], 15, 718787259)),
                            (c = v(c, p, h, u, i[d + 9], 21, -343485551)),
                            (u = (u + w) >>> 0),
                            (c = (c + m) >>> 0),
                            (p = (p + _) >>> 0),
                            (h = (h + S) >>> 0);
                    }
                    return n.endian([u, c, p, h]);
                })._ff = function(e, t, i, n, r, s, a) {
                    var o = e + ((t & i) | (~t & n)) + (r >>> 0) + a;
                    return ((o << s) | (o >>> (32 - s))) + t;
                }),
                (o._gg = function(e, t, i, n, r, s, a) {
                    var o = e + ((t & n) | (i & ~n)) + (r >>> 0) + a;
                    return ((o << s) | (o >>> (32 - s))) + t;
                }),
                (o._hh = function(e, t, i, n, r, s, a) {
                    var o = e + (t ^ i ^ n) + (r >>> 0) + a;
                    return ((o << s) | (o >>> (32 - s))) + t;
                }),
                (o._ii = function(e, t, i, n, r, s, a) {
                    var o = e + (i ^ (t | ~n)) + (r >>> 0) + a;
                    return ((o << s) | (o >>> (32 - s))) + t;
                }),
                (o._blocksize = 16),
                (o._digestsize = 16),
                (e.exports = function(e, t) {
                    if (null == e) throw new Error("Illegal argument " + e);
                    var i = n.wordsToBytes(o(e, t));
                    return t && t.asBytes
                        ? i
                        : t && t.asString
                        ? a.bytesToString(i)
                        : n.bytesToHex(i);
                });
        },
        function(e, t) {
            function i(e, t, i, n, r, s, a) {
                try {
                    var o = e[s](a),
                        l = o.value;
                } catch (e) {
                    return void i(e);
                }
                o.done ? t(l) : Promise.resolve(l).then(n, r);
            }
            (e.exports = function(e) {
                return function() {
                    var t = this,
                        n = arguments;
                    return new Promise(function(r, s) {
                        var a = e.apply(t, n);
                        function o(e) {
                            i(a, r, s, o, l, "next", e);
                        }
                        function l(e) {
                            i(a, r, s, o, l, "throw", e);
                        }
                        o(void 0);
                    });
                };
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            (e.exports = function(e, t) {
                (null == t || t > e.length) && (t = e.length);
                for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];
                return n;
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            var i = {
                utf8: {
                    stringToBytes: function(e) {
                        return i.bin.stringToBytes(
                            unescape(encodeURIComponent(e))
                        );
                    },
                    bytesToString: function(e) {
                        return decodeURIComponent(
                            escape(i.bin.bytesToString(e))
                        );
                    }
                },
                bin: {
                    stringToBytes: function(e) {
                        for (var t = [], i = 0; i < e.length; i++)
                            t.push(255 & e.charCodeAt(i));
                        return t;
                    },
                    bytesToString: function(e) {
                        for (var t = [], i = 0; i < e.length; i++)
                            t.push(String.fromCharCode(e[i]));
                        return t.join("");
                    }
                }
            };
            e.exports = i;
        },
        function(e, t, i) {
            var n = i(9).default,
                r = i(35),
                s = r.MiniappSession,
                a = r.MiniappJoinChooseServer,
                o = r.MiniappConnectWebSocket,
                l = r.MiniappJoin,
                u = r.MiniappPublish,
                c = r.MiniappUnpublish,
                p = r.MiniappSubscribe,
                h = r.MiniappUnsubscribe,
                d = r.MiniappLeave,
                f = r.MiniappServerEvent,
                y = r.MiniappPusherState,
                g = r.MiniappPlayerState,
                v = function(e) {
                    (this.uri = null),
                        (this.miniappSession = null),
                        (this.miniappJoinChooseServer = null),
                        (this.miniappConnectWebSocket = null),
                        (this.miniappJoin = null),
                        (this.miniappPublish = null),
                        (this.miniappUnpublish = null),
                        (this.miniappSubscribe = null),
                        (this.miniappUnsubscribe = null),
                        (this.miniappLeave = null),
                        (this.miniappServerEvent = null),
                        (this.miniappPusherState = null),
                        (this.miniappPlayerState = null),
                        e &&
                            (void 0 !== e.uri &&
                                null !== e.uri &&
                                (this.uri = e.uri),
                            void 0 !== e.miniappSession &&
                                null !== e.miniappSession &&
                                (this.miniappSession = new s(e.miniappSession)),
                            void 0 !== e.miniappJoinChooseServer &&
                                null !== e.miniappJoinChooseServer &&
                                (this.miniappJoinChooseServer = new a(
                                    e.miniappJoinChooseServer
                                )),
                            void 0 !== e.miniappConnectWebSocket &&
                                null !== e.miniappConnectWebSocket &&
                                (this.miniappConnectWebSocket = new o(
                                    e.miniappConnectWebSocket
                                )),
                            void 0 !== e.miniappJoin &&
                                null !== e.miniappJoin &&
                                (this.miniappJoin = new l(e.miniappJoin)),
                            void 0 !== e.miniappPublish &&
                                null !== e.miniappPublish &&
                                (this.miniappPublish = new u(e.miniappPublish)),
                            void 0 !== e.miniappUnpublish &&
                                null !== e.miniappUnpublish &&
                                (this.miniappUnpublish = new c(
                                    e.miniappUnpublish
                                )),
                            void 0 !== e.miniappSubscribe &&
                                null !== e.miniappSubscribe &&
                                (this.miniappSubscribe = new p(
                                    e.miniappSubscribe
                                )),
                            void 0 !== e.miniappUnsubscribe &&
                                null !== e.miniappUnsubscribe &&
                                (this.miniappUnsubscribe = new h(
                                    e.miniappUnsubscribe
                                )),
                            void 0 !== e.miniappLeave &&
                                null !== e.miniappLeave &&
                                (this.miniappLeave = new d(e.miniappLeave)),
                            void 0 !== e.miniappServerEvent &&
                                null !== e.miniappServerEvent &&
                                (this.miniappServerEvent = new f(
                                    e.miniappServerEvent
                                )),
                            void 0 !== e.miniappPusherState &&
                                null !== e.miniappPusherState &&
                                (this.miniappPusherState = new y(
                                    e.miniappPusherState
                                )),
                            void 0 !== e.miniappPlayerState &&
                                null !== e.miniappPlayerState &&
                                (this.miniappPlayerState = new g(
                                    e.miniappPlayerState
                                )));
                };
            ((v.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        r = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (r) {
                        case 1:
                            i == n.Type.I32
                                ? (this.uri = e.readI32().value)
                                : e.skip(i);
                            break;
                        case 8e3:
                            i == n.Type.STRUCT
                                ? ((this.miniappSession = new s()),
                                  this.miniappSession.read(e))
                                : e.skip(i);
                            break;
                        case 8001:
                            i == n.Type.STRUCT
                                ? ((this.miniappJoinChooseServer = new a()),
                                  this.miniappJoinChooseServer.read(e))
                                : e.skip(i);
                            break;
                        case 8002:
                            i == n.Type.STRUCT
                                ? ((this.miniappConnectWebSocket = new o()),
                                  this.miniappConnectWebSocket.read(e))
                                : e.skip(i);
                            break;
                        case 8003:
                            i == n.Type.STRUCT
                                ? ((this.miniappJoin = new l()),
                                  this.miniappJoin.read(e))
                                : e.skip(i);
                            break;
                        case 8004:
                            i == n.Type.STRUCT
                                ? ((this.miniappPublish = new u()),
                                  this.miniappPublish.read(e))
                                : e.skip(i);
                            break;
                        case 8005:
                            i == n.Type.STRUCT
                                ? ((this.miniappUnpublish = new c()),
                                  this.miniappUnpublish.read(e))
                                : e.skip(i);
                            break;
                        case 8006:
                            i == n.Type.STRUCT
                                ? ((this.miniappSubscribe = new p()),
                                  this.miniappSubscribe.read(e))
                                : e.skip(i);
                            break;
                        case 8007:
                            i == n.Type.STRUCT
                                ? ((this.miniappUnsubscribe = new h()),
                                  this.miniappUnsubscribe.read(e))
                                : e.skip(i);
                            break;
                        case 8008:
                            i == n.Type.STRUCT
                                ? ((this.miniappLeave = new d()),
                                  this.miniappLeave.read(e))
                                : e.skip(i);
                            break;
                        case 8009:
                            i == n.Type.STRUCT
                                ? ((this.miniappServerEvent = new f()),
                                  this.miniappServerEvent.read(e))
                                : e.skip(i);
                            break;
                        case 8010:
                            i == n.Type.STRUCT
                                ? ((this.miniappPusherStateEvent = new MiniappPusherStateEvent()),
                                  this.miniappPusherStateEvent.read(e))
                                : e.skip(i);
                            break;
                        case 8011:
                            i == n.Type.STRUCT
                                ? ((this.miniappPlayerStateEvent = new MiniappPlayerStateEvent()),
                                  this.miniappPlayerStateEvent.read(e))
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (v.prototype.write = function(e) {
                    e.writeStructBegin("ReportItem"),
                        null !== this.uri &&
                            void 0 !== this.uri &&
                            (e.writeFieldBegin("uri", n.Type.I32, 1),
                            e.writeI32(this.uri),
                            e.writeFieldEnd()),
                        null !== this.miniappSession &&
                            void 0 !== this.miniappSession &&
                            (e.writeFieldBegin(
                                "miniappSession",
                                n.Type.STRUCT,
                                8e3
                            ),
                            this.miniappSession.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappJoinChooseServer &&
                            void 0 !== this.miniappJoinChooseServer &&
                            (e.writeFieldBegin(
                                "miniappJoinChooseServer",
                                n.Type.STRUCT,
                                8001
                            ),
                            this.miniappJoinChooseServer.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappConnectWebSocket &&
                            void 0 !== this.miniappConnectWebSocket &&
                            (e.writeFieldBegin(
                                "miniappConnectWebSocket",
                                n.Type.STRUCT,
                                8002
                            ),
                            this.miniappConnectWebSocket.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappJoin &&
                            void 0 !== this.miniappJoin &&
                            (e.writeFieldBegin(
                                "miniappJoin",
                                n.Type.STRUCT,
                                8003
                            ),
                            this.miniappJoin.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappPublish &&
                            void 0 !== this.miniappPublish &&
                            (e.writeFieldBegin(
                                "miniappPublish",
                                n.Type.STRUCT,
                                8004
                            ),
                            this.miniappPublish.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappUnpublish &&
                            void 0 !== this.miniappUnpublish &&
                            (e.writeFieldBegin(
                                "miniappUnpublish",
                                n.Type.STRUCT,
                                8005
                            ),
                            this.miniappUnpublish.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappSubscribe &&
                            void 0 !== this.miniappSubscribe &&
                            (e.writeFieldBegin(
                                "miniappSubscribe",
                                n.Type.STRUCT,
                                8006
                            ),
                            this.miniappSubscribe.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappUnsubscribe &&
                            void 0 !== this.miniappUnsubscribe &&
                            (e.writeFieldBegin(
                                "miniappUnsubscribe",
                                n.Type.STRUCT,
                                8007
                            ),
                            this.miniappUnsubscribe.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappLeave &&
                            void 0 !== this.miniappLeave &&
                            (e.writeFieldBegin(
                                "miniappLeave",
                                n.Type.STRUCT,
                                8008
                            ),
                            this.miniappLeave.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappServerEvent &&
                            void 0 !== this.miniappServerEvent &&
                            (e.writeFieldBegin(
                                "miniappServerEvent",
                                n.Type.STRUCT,
                                8009
                            ),
                            this.miniappServerEvent.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappPusherStateEvent &&
                            void 0 !== this.miniappPusherStateEvent &&
                            (e.writeFieldBegin(
                                "miniappPusherStateEvent",
                                n.Type.STRUCT,
                                8010
                            ),
                            this.miniappPusherStateEvent.write(e),
                            e.writeFieldEnd()),
                        null !== this.miniappPlayerStateEvent &&
                            void 0 !== this.miniappPlayerStateEvent &&
                            (e.writeFieldBegin(
                                "miniappPlayerStateEvent",
                                n.Type.STRUCT,
                                8011
                            ),
                            this.miniappPlayerStateEvent.write(e),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                }),
                (e.exports = v);
        },
        function(e, t, i) {
            var n = i(9).default,
                r = function(e) {
                    (this.sid = null),
                        (this.cname = null),
                        (this.cid = null),
                        (this.lts = null),
                        (this.ip = null),
                        (this.uid = null),
                        (this.success = null),
                        (this.elapse = null),
                        (this.peer = null),
                        e &&
                            (void 0 !== e.sid &&
                                null !== e.sid &&
                                (this.sid = e.sid),
                            void 0 !== e.cname &&
                                null !== e.cname &&
                                (this.cname = e.cname),
                            void 0 !== e.cid &&
                                null !== e.cid &&
                                (this.cid = e.cid),
                            void 0 !== e.lts &&
                                null !== e.lts &&
                                (this.lts = e.lts),
                            void 0 !== e.ip &&
                                null !== e.ip &&
                                (this.ip = e.ip),
                            void 0 !== e.uid &&
                                null !== e.uid &&
                                (this.uid = e.uid),
                            void 0 !== e.success &&
                                null !== e.success &&
                                (this.success = e.success),
                            void 0 !== e.elapse &&
                                null !== e.elapse &&
                                (this.elapse = e.elapse),
                            void 0 !== e.peer &&
                                null !== e.peer &&
                                (this.peer = e.peer));
                };
            ((r.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        r = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (r) {
                        case 1:
                            i == n.Type.STRING
                                ? (this.sid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.cname = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.I64
                                ? (this.cid = e.readI64().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.I64
                                ? (this.lts = e.readI64().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.ip = e.readString().value)
                                : e.skip(i);
                            break;
                        case 6:
                            i == n.Type.I64
                                ? (this.uid = e.readI64().value)
                                : e.skip(i);
                            break;
                        case 7:
                            i == n.Type.BOOL
                                ? (this.success = e.readBool().value)
                                : e.skip(i);
                            break;
                        case 8:
                            i == n.Type.I64
                                ? (this.elapse = e.readI64().value)
                                : e.skip(i);
                            break;
                        case 9:
                            i == n.Type.I64
                                ? (this.peer = e.readI64().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (r.prototype.write = function(e) {
                    e.writeStructBegin("VosdkHeader"),
                        null !== this.sid &&
                            void 0 !== this.sid &&
                            (e.writeFieldBegin("sid", n.Type.STRING, 1),
                            e.writeString(this.sid),
                            e.writeFieldEnd()),
                        null !== this.cname &&
                            void 0 !== this.cname &&
                            (e.writeFieldBegin("cname", n.Type.STRING, 2),
                            e.writeString(this.cname),
                            e.writeFieldEnd()),
                        null !== this.cid &&
                            void 0 !== this.cid &&
                            (e.writeFieldBegin("cid", n.Type.I64, 3),
                            e.writeI64(this.cid),
                            e.writeFieldEnd()),
                        null !== this.lts &&
                            void 0 !== this.lts &&
                            (e.writeFieldBegin("lts", n.Type.I64, 4),
                            e.writeI64(this.lts),
                            e.writeFieldEnd()),
                        null !== this.ip &&
                            void 0 !== this.ip &&
                            (e.writeFieldBegin("ip", n.Type.STRING, 5),
                            e.writeString(this.ip),
                            e.writeFieldEnd()),
                        null !== this.uid &&
                            void 0 !== this.uid &&
                            (e.writeFieldBegin("uid", n.Type.I64, 6),
                            e.writeI64(this.uid),
                            e.writeFieldEnd()),
                        null !== this.success &&
                            void 0 !== this.success &&
                            (e.writeFieldBegin("success", n.Type.BOOL, 7),
                            e.writeBool(this.success),
                            e.writeFieldEnd()),
                        null !== this.elapse &&
                            void 0 !== this.elapse &&
                            (e.writeFieldBegin("elapse", n.Type.I64, 8),
                            e.writeI64(this.elapse),
                            e.writeFieldEnd()),
                        null !== this.peer &&
                            void 0 !== this.peer &&
                            (e.writeFieldBegin("peer", n.Type.I64, 9),
                            e.writeI64(this.peer),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var s = function(e) {
                (this.name = null),
                    (this.lts = null),
                    (this.value = null),
                    (this.id = null),
                    (this.tagErrorCode = null),
                    e &&
                        (void 0 !== e.name &&
                            null !== e.name &&
                            (this.name = e.name),
                        void 0 !== e.lts &&
                            null !== e.lts &&
                            (this.lts = e.lts),
                        void 0 !== e.value &&
                            null !== e.value &&
                            (this.value = e.value),
                        void 0 !== e.id && null !== e.id && (this.id = e.id),
                        void 0 !== e.tagErrorCode &&
                            null !== e.tagErrorCode &&
                            (this.tagErrorCode = e.tagErrorCode));
            };
            ((s.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        r = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (r) {
                        case 1:
                            i == n.Type.STRING
                                ? (this.name = e.readString().value)
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.I64
                                ? (this.lts = e.readI64().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.I32
                                ? (this.value = e.readI32().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.I32
                                ? (this.id = e.readI32().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.I32
                                ? (this.tagErrorCode = e.readI32().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (s.prototype.write = function(e) {
                    e.writeStructBegin("VosdkCounterItem"),
                        null !== this.name &&
                            void 0 !== this.name &&
                            (e.writeFieldBegin("name", n.Type.STRING, 1),
                            e.writeString(this.name),
                            e.writeFieldEnd()),
                        null !== this.lts &&
                            void 0 !== this.lts &&
                            (e.writeFieldBegin("lts", n.Type.I64, 2),
                            e.writeI64(this.lts),
                            e.writeFieldEnd()),
                        null !== this.value &&
                            void 0 !== this.value &&
                            (e.writeFieldBegin("value", n.Type.I32, 3),
                            e.writeI32(this.value),
                            e.writeFieldEnd()),
                        null !== this.id &&
                            void 0 !== this.id &&
                            (e.writeFieldBegin("id", n.Type.I32, 4),
                            e.writeI32(this.id),
                            e.writeFieldEnd()),
                        null !== this.tagErrorCode &&
                            void 0 !== this.tagErrorCode &&
                            (e.writeFieldBegin("tagErrorCode", n.Type.I32, 5),
                            e.writeI32(this.tagErrorCode),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var a = function(e) {
                (this.header = null),
                    (this.items = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.items &&
                            null !== e.items &&
                            (this.items = n.copyList(e.items, [s])));
            };
            ((a.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        a = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (a) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            if (i == n.Type.LIST) {
                                var o, l;
                                this.items = [];
                                (l = e.readListBegin()).etype, (o = l.size);
                                for (var u = 0; u < o; ++u) {
                                    var c = null;
                                    (c = new s()).read(e), this.items.push(c);
                                }
                                e.readListEnd();
                            } else e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (a.prototype.write = function(e) {
                    if (
                        (e.writeStructBegin("VosdkCounter"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.items && void 0 !== this.items)
                    ) {
                        for (var t in (e.writeFieldBegin(
                            "items",
                            n.Type.LIST,
                            2
                        ),
                        e.writeListBegin(n.Type.STRUCT, this.items.length),
                        this.items))
                            this.items.hasOwnProperty(t) &&
                                (t = this.items[t]).write(e);
                        e.writeListEnd(), e.writeFieldEnd();
                    }
                    e.writeFieldStop(), e.writeStructEnd();
                }),
                (e.exports = {
                    VosdkHeader: r,
                    VosdkCounter: a,
                    VosdkCounterItem: s
                });
        },
        function(e, t, i) {
            "use strict";

            e.exports = p;
            var n,
                r = i(7),
                s = r.LongBits,
                a = r.base64,
                o = r.utf8;
            function l(e, t, i) {
                (this.fn = e),
                    (this.len = t),
                    (this.next = void 0),
                    (this.val = i);
            }
            function u() {}
            function c(e) {
                (this.head = e.head),
                    (this.tail = e.tail),
                    (this.len = e.len),
                    (this.next = e.states);
            }
            function p() {
                (this.len = 0),
                    (this.head = new l(u, 0, 0)),
                    (this.tail = this.head),
                    (this.states = null);
            }
            var h = function() {
                return r.Buffer
                    ? function() {
                          return (p.create = function() {
                              return new n();
                          })();
                      }
                    : function() {
                          return new p();
                      };
            };
            function d(e, t, i) {
                t[i] = 255 & e;
            }
            function f(e, t) {
                (this.len = e), (this.next = void 0), (this.val = t);
            }
            function y(e, t, i) {
                for (; e.hi; )
                    (t[i++] = (127 & e.lo) | 128),
                        (e.lo = ((e.lo >>> 7) | (e.hi << 25)) >>> 0),
                        (e.hi >>>= 7);
                for (; e.lo > 127; )
                    (t[i++] = (127 & e.lo) | 128), (e.lo = e.lo >>> 7);
                t[i++] = e.lo;
            }
            function g(e, t, i) {
                (t[i] = 255 & e),
                    (t[i + 1] = (e >>> 8) & 255),
                    (t[i + 2] = (e >>> 16) & 255),
                    (t[i + 3] = e >>> 24);
            }
            (p.create = h()),
                (p.alloc = function(e) {
                    return new r.Array(e);
                }),
                r.Array !== Array &&
                    (p.alloc = r.pool(p.alloc, r.Array.prototype.subarray)),
                (p.prototype._push = function(e, t, i) {
                    return (
                        (this.tail = this.tail.next = new l(e, t, i)),
                        (this.len += t),
                        this
                    );
                }),
                (f.prototype = Object.create(l.prototype)),
                (f.prototype.fn = function(e, t, i) {
                    for (; e > 127; ) (t[i++] = (127 & e) | 128), (e >>>= 7);
                    t[i] = e;
                }),
                (p.prototype.uint32 = function(e) {
                    return (
                        (this.len += (this.tail = this.tail.next = new f(
                            (e >>>= 0) < 128
                                ? 1
                                : e < 16384
                                ? 2
                                : e < 2097152
                                ? 3
                                : e < 268435456
                                ? 4
                                : 5,
                            e
                        )).len),
                        this
                    );
                }),
                (p.prototype.int32 = function(e) {
                    return e < 0
                        ? this._push(y, 10, s.fromNumber(e))
                        : this.uint32(e);
                }),
                (p.prototype.sint32 = function(e) {
                    return this.uint32(((e << 1) ^ (e >> 31)) >>> 0);
                }),
                (p.prototype.uint64 = function(e) {
                    var t = s.from(e);
                    return this._push(y, t.length(), t);
                }),
                (p.prototype.int64 = p.prototype.uint64),
                (p.prototype.sint64 = function(e) {
                    var t = s.from(e).zzEncode();
                    return this._push(y, t.length(), t);
                }),
                (p.prototype.bool = function(e) {
                    return this._push(d, 1, e ? 1 : 0);
                }),
                (p.prototype.fixed32 = function(e) {
                    return this._push(g, 4, e >>> 0);
                }),
                (p.prototype.sfixed32 = p.prototype.fixed32),
                (p.prototype.fixed64 = function(e) {
                    var t = s.from(e);
                    return this._push(g, 4, t.lo)._push(g, 4, t.hi);
                }),
                (p.prototype.sfixed64 = p.prototype.fixed64),
                (p.prototype.float = function(e) {
                    return this._push(r.float.writeFloatLE, 4, e);
                }),
                (p.prototype.double = function(e) {
                    return this._push(r.float.writeDoubleLE, 8, e);
                });
            var v = r.Array.prototype.set
                ? function(e, t, i) {
                      t.set(e, i);
                  }
                : function(e, t, i) {
                      for (var n = 0; n < e.length; ++n) t[i + n] = e[n];
                  };
            (p.prototype.bytes = function(e) {
                var t = e.length >>> 0;
                if (!t) return this._push(d, 1, 0);
                if (r.isString(e)) {
                    var i = p.alloc((t = a.length(e)));
                    a.decode(e, i, 0), (e = i);
                }
                return this.uint32(t)._push(v, t, e);
            }),
                (p.prototype.string = function(e) {
                    var t = o.length(e);
                    return t
                        ? this.uint32(t)._push(o.write, t, e)
                        : this._push(d, 1, 0);
                }),
                (p.prototype.fork = function() {
                    return (
                        (this.states = new c(this)),
                        (this.head = this.tail = new l(u, 0, 0)),
                        (this.len = 0),
                        this
                    );
                }),
                (p.prototype.reset = function() {
                    return (
                        this.states
                            ? ((this.head = this.states.head),
                              (this.tail = this.states.tail),
                              (this.len = this.states.len),
                              (this.states = this.states.next))
                            : ((this.head = this.tail = new l(u, 0, 0)),
                              (this.len = 0)),
                        this
                    );
                }),
                (p.prototype.ldelim = function() {
                    var e = this.head,
                        t = this.tail,
                        i = this.len;
                    return (
                        this.reset().uint32(i),
                        i &&
                            ((this.tail.next = e.next),
                            (this.tail = t),
                            (this.len += i)),
                        this
                    );
                }),
                (p.prototype.finish = function() {
                    for (
                        var e = this.head.next,
                            t = this.constructor.alloc(this.len),
                            i = 0;
                        e;

                    )
                        e.fn(e.val, t, i), (i += e.len), (e = e.next);
                    return t;
                }),
                (p._configure = function(e) {
                    (n = e), (p.create = h()), n._configure();
                });
        },
        function(e, t, i) {
            "use strict";

            e.exports = l;
            var n,
                r = i(7),
                s = r.LongBits,
                a = r.utf8;
            function o(e, t) {
                return RangeError(
                    "index out of range: " +
                        e.pos +
                        " + " +
                        (t || 1) +
                        " > " +
                        e.len
                );
            }
            function l(e) {
                (this.buf = e), (this.pos = 0), (this.len = e.length);
            }
            var u,
                c =
                    "undefined" != typeof Uint8Array
                        ? function(e) {
                              if (e instanceof Uint8Array || Array.isArray(e))
                                  return new l(e);
                              throw Error("illegal buffer");
                          }
                        : function(e) {
                              if (Array.isArray(e)) return new l(e);
                              throw Error("illegal buffer");
                          },
                p = function() {
                    return r.Buffer
                        ? function(e) {
                              return (l.create = function(e) {
                                  return r.Buffer.isBuffer(e) ? new n(e) : c(e);
                              })(e);
                          }
                        : c;
                };
            function h() {
                var e = new s(0, 0),
                    t = 0;
                if (!(this.len - this.pos > 4)) {
                    for (; t < 3; ++t) {
                        if (this.pos >= this.len) throw o(this);
                        if (
                            ((e.lo =
                                (e.lo |
                                    ((127 & this.buf[this.pos]) << (7 * t))) >>>
                                0),
                            this.buf[this.pos++] < 128)
                        )
                            return e;
                    }
                    return (
                        (e.lo =
                            (e.lo |
                                ((127 & this.buf[this.pos++]) << (7 * t))) >>>
                            0),
                        e
                    );
                }
                for (; t < 4; ++t)
                    if (
                        ((e.lo =
                            (e.lo | ((127 & this.buf[this.pos]) << (7 * t))) >>>
                            0),
                        this.buf[this.pos++] < 128)
                    )
                        return e;
                if (
                    ((e.lo = (e.lo | ((127 & this.buf[this.pos]) << 28)) >>> 0),
                    (e.hi = (e.hi | ((127 & this.buf[this.pos]) >> 4)) >>> 0),
                    this.buf[this.pos++] < 128)
                )
                    return e;
                if (((t = 0), this.len - this.pos > 4)) {
                    for (; t < 5; ++t)
                        if (
                            ((e.hi =
                                (e.hi |
                                    ((127 & this.buf[this.pos]) <<
                                        (7 * t + 3))) >>>
                                0),
                            this.buf[this.pos++] < 128)
                        )
                            return e;
                } else
                    for (; t < 5; ++t) {
                        if (this.pos >= this.len) throw o(this);
                        if (
                            ((e.hi =
                                (e.hi |
                                    ((127 & this.buf[this.pos]) <<
                                        (7 * t + 3))) >>>
                                0),
                            this.buf[this.pos++] < 128)
                        )
                            return e;
                    }
                throw Error("invalid varint encoding");
            }
            function d(e, t) {
                return (
                    (e[t - 4] |
                        (e[t - 3] << 8) |
                        (e[t - 2] << 16) |
                        (e[t - 1] << 24)) >>>
                    0
                );
            }
            function f() {
                if (this.pos + 8 > this.len) throw o(this, 8);
                return new s(
                    d(this.buf, (this.pos += 4)),
                    d(this.buf, (this.pos += 4))
                );
            }
            (l.create = p()),
                (l.prototype._slice =
                    r.Array.prototype.subarray || r.Array.prototype.slice),
                (l.prototype.uint32 =
                    ((u = 4294967295),
                    function() {
                        if (
                            ((u = (127 & this.buf[this.pos]) >>> 0),
                            this.buf[this.pos++] < 128)
                        )
                            return u;
                        if (
                            ((u =
                                (u | ((127 & this.buf[this.pos]) << 7)) >>> 0),
                            this.buf[this.pos++] < 128)
                        )
                            return u;
                        if (
                            ((u =
                                (u | ((127 & this.buf[this.pos]) << 14)) >>> 0),
                            this.buf[this.pos++] < 128)
                        )
                            return u;
                        if (
                            ((u =
                                (u | ((127 & this.buf[this.pos]) << 21)) >>> 0),
                            this.buf[this.pos++] < 128)
                        )
                            return u;
                        if (
                            ((u =
                                (u | ((15 & this.buf[this.pos]) << 28)) >>> 0),
                            this.buf[this.pos++] < 128)
                        )
                            return u;
                        if ((this.pos += 5) > this.len)
                            throw ((this.pos = this.len), o(this, 10));
                        return u;
                    })),
                (l.prototype.int32 = function() {
                    return 0 | this.uint32();
                }),
                (l.prototype.sint32 = function() {
                    var e = this.uint32();
                    return ((e >>> 1) ^ -(1 & e)) | 0;
                }),
                (l.prototype.bool = function() {
                    return 0 !== this.uint32();
                }),
                (l.prototype.fixed32 = function() {
                    if (this.pos + 4 > this.len) throw o(this, 4);
                    return d(this.buf, (this.pos += 4));
                }),
                (l.prototype.sfixed32 = function() {
                    if (this.pos + 4 > this.len) throw o(this, 4);
                    return 0 | d(this.buf, (this.pos += 4));
                }),
                (l.prototype.float = function() {
                    if (this.pos + 4 > this.len) throw o(this, 4);
                    var e = r.float.readFloatLE(this.buf, this.pos);
                    return (this.pos += 4), e;
                }),
                (l.prototype.double = function() {
                    if (this.pos + 8 > this.len) throw o(this, 4);
                    var e = r.float.readDoubleLE(this.buf, this.pos);
                    return (this.pos += 8), e;
                }),
                (l.prototype.bytes = function() {
                    var e = this.uint32(),
                        t = this.pos,
                        i = this.pos + e;
                    if (i > this.len) throw o(this, e);
                    return (
                        (this.pos += e),
                        Array.isArray(this.buf)
                            ? this.buf.slice(t, i)
                            : t === i
                            ? new this.buf.constructor(0)
                            : this._slice.call(this.buf, t, i)
                    );
                }),
                (l.prototype.string = function() {
                    var e = this.bytes();
                    return a.read(e, 0, e.length);
                }),
                (l.prototype.skip = function(e) {
                    if ("number" == typeof e) {
                        if (this.pos + e > this.len) throw o(this, e);
                        this.pos += e;
                    } else
                        do {
                            if (this.pos >= this.len) throw o(this);
                        } while (128 & this.buf[this.pos++]);
                    return this;
                }),
                (l.prototype.skipType = function(e) {
                    switch (e) {
                        case 0:
                            this.skip();
                            break;
                        case 1:
                            this.skip(8);
                            break;
                        case 2:
                            this.skip(this.uint32());
                            break;
                        case 3:
                            for (; 4 != (e = 7 & this.uint32()); )
                                this.skipType(e);
                            break;
                        case 5:
                            this.skip(4);
                            break;
                        default:
                            throw Error(
                                "invalid wire type " +
                                    e +
                                    " at offset " +
                                    this.pos
                            );
                    }
                    return this;
                }),
                (l._configure = function(e) {
                    (n = e), (l.create = p()), n._configure();
                    var t = r.Long ? "toLong" : "toNumber";
                    r.merge(l.prototype, {
                        int64: function() {
                            return h.call(this)[t](!1);
                        },
                        uint64: function() {
                            return h.call(this)[t](!0);
                        },
                        sint64: function() {
                            return h
                                .call(this)
                                .zzDecode()
                                [t](!1);
                        },
                        fixed64: function() {
                            return f.call(this)[t](!0);
                        },
                        sfixed64: function() {
                            return f.call(this)[t](!1);
                        }
                    });
                });
        },
        function(e, t, i) {
            var n = i(24),
                r = i(25);
            e.exports = function(e, t, i) {
                var s = (t && i) || 0;
                "string" == typeof e &&
                    ((t = "binary" === e ? new Array(16) : null), (e = null));
                var a = (e = e || {}).random || (e.rng || n)();
                if (((a[6] = (15 & a[6]) | 64), (a[8] = (63 & a[8]) | 128), t))
                    for (var o = 0; o < 16; ++o) t[s + o] = a[o];
                return t || r(a);
            };
        },
        function(e, t) {
            function i() {
                return (
                    (e.exports = i = Object.assign
                        ? Object.assign.bind()
                        : function(e) {
                              for (var t = 1; t < arguments.length; t++) {
                                  var i = arguments[t];
                                  for (var n in i)
                                      Object.prototype.hasOwnProperty.call(
                                          i,
                                          n
                                      ) && (e[n] = i[n]);
                              }
                              return e;
                          }),
                    (e.exports.__esModule = !0),
                    (e.exports.default = e.exports),
                    i.apply(this, arguments)
                );
            }
            (e.exports = i),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            (e.exports = function(e, t, i) {
                return (
                    t in e
                        ? Object.defineProperty(e, t, {
                              value: i,
                              enumerable: !0,
                              configurable: !0,
                              writable: !0
                          })
                        : (e[t] = i),
                    e
                );
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t, i) {
            "use strict";

            var n,
                r,
                s,
                a,
                o,
                l = i(36),
                u = l.Writer,
                c = l.util,
                p = l.roots.default || (l.roots.default = {});
            (p.io =
                (((o = {}).agora =
                    (((a = {}).pb =
                        (((s = {}).CounterCompact = (function() {
                            function e(e) {
                                if (((this.items = []), e))
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.sid = ""),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.items = c.emptyArray),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    if (
                                        (t || (t = u.create()),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(10).string(e.sid),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(16).int64(e.peer),
                                        null != e.items && e.items.length)
                                    )
                                        for (var i = 0; i < e.items.length; ++i)
                                            p.io.agora.pb.Item.encode(
                                                e.items[i],
                                                t.uint32(26).fork()
                                            ).ldelim();
                                    return t;
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Item = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.id = 11001),
                                (e.prototype.value = 0),
                                (e.prototype.tagErrorCode = 0),
                                (e.prototype.streamId = 0),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.id &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "id"
                                            ) &&
                                            t.uint32(16).int32(e.id),
                                        null != e.value &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "value"
                                            ) &&
                                            t.uint32(24).int32(e.value),
                                        null != e.tagErrorCode &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "tagErrorCode"
                                            ) &&
                                            t.uint32(32).int32(e.tagErrorCode),
                                        null != e.streamId &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "streamId"
                                            ) &&
                                            t.uint32(40).uint32(e.streamId),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Id =
                            ((n = {}),
                            ((r = Object.create(n))[
                                (n[11001] = "Miniapp_SDK_Pusher_Video_Bitrate")
                            ] = 11001),
                            (r[
                                (n[11002] = "Miniapp_SDK_Pusher_Audio_Bitrate")
                            ] = 11002),
                            (r[
                                (n[11003] = "Miniapp_SDK_Pusher_Video_FPS")
                            ] = 11003),
                            (r[
                                (n[11004] = "Miniapp_SDK_Pusher_Video_GOP")
                            ] = 11004),
                            (r[
                                (n[11005] = "Miniapp_SDK_Pusher_Net_Speed")
                            ] = 11005),
                            (r[
                                (n[11006] = "Miniapp_SDK_Pusher_Video_Cache")
                            ] = 11006),
                            (r[
                                (n[11007] = "Miniapp_SDK_Pusher_Audio_Cache")
                            ] = 11007),
                            (r[
                                (n[11008] = "Miniapp_SDK_Player_Video_Bitrate")
                            ] = 11008),
                            (r[
                                (n[11009] = "Miniapp_SDK_Player_Audio_Bitrate")
                            ] = 11009),
                            (r[
                                (n[11010] = "Miniapp_SDK_Player_Video_FPS")
                            ] = 11010),
                            (r[
                                (n[11011] = "Miniapp_SDK_Player_Video_GOP")
                            ] = 11011),
                            (r[
                                (n[11012] = "Miniapp_SDK_Player_Net_Speed")
                            ] = 11012),
                            (r[
                                (n[11013] = "Miniapp_SDK_Player_Video_Cache")
                            ] = 11013),
                            (r[
                                (n[11014] = "Miniapp_SDK_Player_Audio_Cache")
                            ] = 11014),
                            (r[
                                (n[11015] =
                                    "Miniapp_SDK_Player_V_Dec_Cache_Size")
                            ] = 11015),
                            (r[
                                (n[11016] =
                                    "Miniapp_SDK_Player_V_Sum_Cache_Size")
                            ] = 11016),
                            (r[
                                (n[11017] =
                                    "Miniapp_SDK_Player_AV_Play_Interval")
                            ] = 11017),
                            (r[
                                (n[11018] =
                                    "Miniapp_SDK_Player_AV_Recv_Interval")
                            ] = 11018),
                            (r[
                                (n[11019] =
                                    "Miniapp_SDK_Player_Audio_Cache_Threshold")
                            ] = 11019),
                            (r[
                                (n[11022] = "Miniapp_SDK_Pusher_Video_Height")
                            ] = 11022),
                            (r[
                                (n[11023] = "Miniapp_SDK_Pusher_Video_Width")
                            ] = 11023),
                            (r[
                                (n[11024] = "Miniapp_SDK_Player_Video_Width")
                            ] = 11024),
                            (r[
                                (n[11025] = "Miniapp_SDK_Player_Video_Height")
                            ] = 11025),
                            (r[
                                (n[11035] = "Miniapp_SDK_Pusher_Net_Jitter")
                            ] = 11035),
                            (r[
                                (n[11036] =
                                    "Miniapp_SDK_Pusher_Net_QualityLevel")
                            ] = 11036),
                            (r[
                                (n[11037] = "Miniapp_SDK_Player_Net_Jitter")
                            ] = 11037),
                            (r[
                                (n[11038] =
                                    "Miniapp_SDK_Player_Net_QualityLevel")
                            ] = 11038),
                            r)),
                        (s.ConnectWebSocket = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.gateway = ""),
                                (e.prototype.ec = ""),
                                (e.prototype.wsurl = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.gateway &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "gateway"
                                            ) &&
                                            t.uint32(82).string(e.gateway),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(90).string(e.ec),
                                        null != e.wsurl &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "wsurl"
                                            ) &&
                                            t.uint32(98).string(e.wsurl),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(106).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Join = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.isrejoin = 0),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.isrejoin &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "isrejoin"
                                            ) &&
                                            t.uint32(88).int32(e.isrejoin),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(98).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.JoinChooseServer = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.csurl = ""),
                                (e.prototype.ec = ""),
                                (e.prototype.gatewaylist = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.csurl &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "csurl"
                                            ) &&
                                            t.uint32(82).string(e.csurl),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(90).string(e.ec),
                                        null != e.gatewaylist &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "gatewaylist"
                                            ) &&
                                            t.uint32(98).string(e.gatewaylist),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(106).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Leave = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(82).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.MuteLocal = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.vid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.target = 0),
                                (e.prototype.mute = 0),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.vid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "vid"
                                            ) &&
                                            t.uint32(16).int64(e.vid),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(26).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(34).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(40).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(50).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(58).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(64).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(72).int64(e.elapse),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(90).string(e.ec),
                                        null != e.target &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "target"
                                            ) &&
                                            t.uint32(96).int32(e.target),
                                        null != e.mute &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "mute"
                                            ) &&
                                            t.uint32(104).int32(e.mute),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.MuteRemote = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.vid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.target = 0),
                                (e.prototype.mute = 0),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.vid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "vid"
                                            ) &&
                                            t.uint32(16).int64(e.vid),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(26).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(34).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(40).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(50).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(58).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(64).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(72).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(80).int64(e.peer),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(90).string(e.ec),
                                        null != e.target &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "target"
                                            ) &&
                                            t.uint32(96).int32(e.target),
                                        null != e.mute &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "mute"
                                            ) &&
                                            t.uint32(104).int32(e.mute),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.PlayerState = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.url = ""),
                                (e.prototype.code = 0),
                                (e.prototype.status = ""),
                                (e.prototype.error = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.url &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "url"
                                            ) &&
                                            t.uint32(82).string(e.url),
                                        null != e.code &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "code"
                                            ) &&
                                            t.uint32(88).int32(e.code),
                                        null != e.status &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "status"
                                            ) &&
                                            t.uint32(98).string(e.status),
                                        null != e.error &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "error"
                                            ) &&
                                            t.uint32(106).string(e.error),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(114).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Publish = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.pushurl = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.pushurl &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "pushurl"
                                            ) &&
                                            t.uint32(90).string(e.pushurl),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(106).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.PusherState = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.url = ""),
                                (e.prototype.code = 0),
                                (e.prototype.status = ""),
                                (e.prototype.error = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.url &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "url"
                                            ) &&
                                            t.uint32(82).string(e.url),
                                        null != e.code &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "code"
                                            ) &&
                                            t.uint32(88).int32(e.code),
                                        null != e.status &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "status"
                                            ) &&
                                            t.uint32(98).string(e.status),
                                        null != e.error &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "error"
                                            ) &&
                                            t.uint32(106).string(e.error),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(114).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.ServerEvent = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.action = ""),
                                (e.prototype.details = ""),
                                (e.prototype.reqTs = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.action &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "action"
                                            ) &&
                                            t.uint32(82).string(e.action),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(90).string(e.details),
                                        null != e.reqTs &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "reqTs"
                                            ) &&
                                            t.uint32(96).int64(e.reqTs),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Session = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.appid = ""),
                                (e.prototype.uname = ""),
                                (e.prototype.ver = ""),
                                (e.prototype.dk = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.appid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "appid"
                                            ) &&
                                            t.uint32(82).string(e.appid),
                                        null != e.uname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uname"
                                            ) &&
                                            t.uint32(90).string(e.uname),
                                        null != e.ver &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ver"
                                            ) &&
                                            t.uint32(98).string(e.ver),
                                        null != e.dk &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "dk"
                                            ) &&
                                            t.uint32(106).string(e.dk),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(114).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Subscribe = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.pullurl = ""),
                                (e.prototype.peerid = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.pullurl &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "pullurl"
                                            ) &&
                                            t.uint32(90).string(e.pullurl),
                                        null != e.peerid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peerid"
                                            ) &&
                                            t.uint32(98).string(e.peerid),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(106).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Unpublish = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(98).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.Unsubscribe = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.peer = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.peerid = ""),
                                (e.prototype.details = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(18).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(26).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(32).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(42).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(50).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(56).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(64).int64(e.elapse),
                                        null != e.peer &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peer"
                                            ) &&
                                            t.uint32(72).int64(e.peer),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.peerid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "peerid"
                                            ) &&
                                            t.uint32(90).string(e.peerid),
                                        null != e.details &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "details"
                                            ) &&
                                            t.uint32(98).string(e.details),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.SetRemoteVideoStreamType = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.vid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.type = 0),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.vid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "vid"
                                            ) &&
                                            t.uint32(16).int64(e.vid),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(26).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(34).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(40).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(50).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(58).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(64).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(72).int64(e.elapse),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.type &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "type"
                                            ) &&
                                            t.uint32(88).int32(e.type),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.RenewToken = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.vid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.vid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "vid"
                                            ) &&
                                            t.uint32(16).int64(e.vid),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(26).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(34).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(40).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(50).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(58).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(64).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(72).int64(e.elapse),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        (s.SetRole = (function() {
                            function e(e) {
                                if (e)
                                    for (
                                        var t = Object.keys(e), i = 0;
                                        i < t.length;
                                        ++i
                                    )
                                        null != e[t[i]] &&
                                            (this[t[i]] = e[t[i]]);
                            }
                            return (
                                (e.prototype.lts = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.vid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.sid = ""),
                                (e.prototype.cname = ""),
                                (e.prototype.cid = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ip = ""),
                                (e.prototype.uid = ""),
                                (e.prototype.success = 0),
                                (e.prototype.elapse = c.Long
                                    ? c.Long.fromBits(0, 0, !1)
                                    : 0),
                                (e.prototype.ec = ""),
                                (e.prototype.role = 0),
                                (e.create = function(t) {
                                    return new e(t);
                                }),
                                (e.encode = function(e, t) {
                                    return (
                                        t || (t = u.create()),
                                        null != e.lts &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "lts"
                                            ) &&
                                            t.uint32(8).int64(e.lts),
                                        null != e.vid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "vid"
                                            ) &&
                                            t.uint32(16).int64(e.vid),
                                        null != e.sid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "sid"
                                            ) &&
                                            t.uint32(26).string(e.sid),
                                        null != e.cname &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cname"
                                            ) &&
                                            t.uint32(34).string(e.cname),
                                        null != e.cid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "cid"
                                            ) &&
                                            t.uint32(40).int64(e.cid),
                                        null != e.ip &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ip"
                                            ) &&
                                            t.uint32(50).string(e.ip),
                                        null != e.uid &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "uid"
                                            ) &&
                                            t.uint32(58).string(e.uid),
                                        null != e.success &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "success"
                                            ) &&
                                            t.uint32(64).int32(e.success),
                                        null != e.elapse &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "elapse"
                                            ) &&
                                            t.uint32(72).int64(e.elapse),
                                        null != e.ec &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "ec"
                                            ) &&
                                            t.uint32(82).string(e.ec),
                                        null != e.role &&
                                            Object.hasOwnProperty.call(
                                                e,
                                                "role"
                                            ) &&
                                            t.uint32(88).int32(e.role),
                                        t
                                    );
                                }),
                                (e.encodeDelimited = function(e, t) {
                                    return this.encode(e, t).ldelim();
                                }),
                                e
                            );
                        })()),
                        s)),
                    a)),
                o)),
                (e.exports = p);
        },
        function(e, t) {
            var i =
                ("undefined" != typeof crypto &&
                    crypto.getRandomValues &&
                    crypto.getRandomValues.bind(crypto)) ||
                ("undefined" != typeof msCrypto &&
                    "function" == typeof window.msCrypto.getRandomValues &&
                    msCrypto.getRandomValues.bind(msCrypto));
            if (i) {
                var n = new Uint8Array(16);
                e.exports = function() {
                    return i(n), n;
                };
            } else {
                var r = new Array(16);
                e.exports = function() {
                    for (var e, t = 0; t < 16; t++)
                        0 == (3 & t) && (e = 4294967296 * Math.random()),
                            (r[t] = (e >>> ((3 & t) << 3)) & 255);
                    return r;
                };
            }
        },
        function(e, t) {
            for (var i = [], n = 0; n < 256; ++n)
                i[n] = (n + 256).toString(16).substr(1);
            e.exports = function(e, t) {
                var n = t || 0,
                    r = i;
                return [
                    r[e[n++]],
                    r[e[n++]],
                    r[e[n++]],
                    r[e[n++]],
                    "-",
                    r[e[n++]],
                    r[e[n++]],
                    "-",
                    r[e[n++]],
                    r[e[n++]],
                    "-",
                    r[e[n++]],
                    r[e[n++]],
                    "-",
                    r[e[n++]],
                    r[e[n++]],
                    r[e[n++]],
                    r[e[n++]],
                    r[e[n++]],
                    r[e[n++]]
                ].join("");
            };
        },
        function(e, t, i) {
            var n = i(10).default;
            function r() {
                "use strict";

                /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
                (e.exports = r = function() {
                    return t;
                }),
                    (e.exports.__esModule = !0),
                    (e.exports.default = e.exports);
                var t = {},
                    i = Object.prototype,
                    s = i.hasOwnProperty,
                    a = "function" == typeof Symbol ? Symbol : {},
                    o = a.iterator || "@@iterator",
                    l = a.asyncIterator || "@@asyncIterator",
                    u = a.toStringTag || "@@toStringTag";
                function c(e, t, i) {
                    return (
                        Object.defineProperty(e, t, {
                            value: i,
                            enumerable: !0,
                            configurable: !0,
                            writable: !0
                        }),
                        e[t]
                    );
                }
                try {
                    c({}, "");
                } catch (e) {
                    c = function(e, t, i) {
                        return (e[t] = i);
                    };
                }
                function p(e, t, i, n) {
                    var r = t && t.prototype instanceof f ? t : f,
                        s = Object.create(r.prototype),
                        a = new R(n || []);
                    return (
                        (s._invoke = (function(e, t, i) {
                            var n = "suspendedStart";
                            return function(r, s) {
                                if ("executing" === n)
                                    throw new Error(
                                        "Generator is already running"
                                    );
                                if ("completed" === n) {
                                    if ("throw" === r) throw s;
                                    return I();
                                }
                                for (i.method = r, i.arg = s; ; ) {
                                    var a = i.delegate;
                                    if (a) {
                                        var o = E(a, i);
                                        if (o) {
                                            if (o === d) continue;
                                            return o;
                                        }
                                    }
                                    if ("next" === i.method)
                                        i.sent = i._sent = i.arg;
                                    else if ("throw" === i.method) {
                                        if ("suspendedStart" === n)
                                            throw ((n = "completed"), i.arg);
                                        i.dispatchException(i.arg);
                                    } else
                                        "return" === i.method &&
                                            i.abrupt("return", i.arg);
                                    n = "executing";
                                    var l = h(e, t, i);
                                    if ("normal" === l.type) {
                                        if (
                                            ((n = i.done
                                                ? "completed"
                                                : "suspendedYield"),
                                            l.arg === d)
                                        )
                                            continue;
                                        return {
                                            value: l.arg,
                                            done: i.done
                                        };
                                    }
                                    "throw" === l.type &&
                                        ((n = "completed"),
                                        (i.method = "throw"),
                                        (i.arg = l.arg));
                                }
                            };
                        })(e, i, a)),
                        s
                    );
                }
                function h(e, t, i) {
                    try {
                        return {
                            type: "normal",
                            arg: e.call(t, i)
                        };
                    } catch (e) {
                        return {
                            type: "throw",
                            arg: e
                        };
                    }
                }
                t.wrap = p;
                var d = {};
                function f() {}
                function y() {}
                function g() {}
                var v = {};
                c(v, o, function() {
                    return this;
                });
                var w = Object.getPrototypeOf,
                    m = w && w(w(k([])));
                m && m !== i && s.call(m, o) && (v = m);
                var _ = (g.prototype = f.prototype = Object.create(v));
                function S(e) {
                    ["next", "throw", "return"].forEach(function(t) {
                        c(e, t, function(e) {
                            return this._invoke(t, e);
                        });
                    });
                }
                function T(e, t) {
                    var i;
                    this._invoke = function(r, a) {
                        function o() {
                            return new t(function(i, o) {
                                !(function i(r, a, o, l) {
                                    var u = h(e[r], e, a);
                                    if ("throw" !== u.type) {
                                        var c = u.arg,
                                            p = c.value;
                                        return p &&
                                            "object" == n(p) &&
                                            s.call(p, "__await")
                                            ? t.resolve(p.__await).then(
                                                  function(e) {
                                                      i("next", e, o, l);
                                                  },
                                                  function(e) {
                                                      i("throw", e, o, l);
                                                  }
                                              )
                                            : t.resolve(p).then(
                                                  function(e) {
                                                      (c.value = e), o(c);
                                                  },
                                                  function(e) {
                                                      return i(
                                                          "throw",
                                                          e,
                                                          o,
                                                          l
                                                      );
                                                  }
                                              );
                                    }
                                    l(u.arg);
                                })(r, a, i, o);
                            });
                        }
                        return (i = i ? i.then(o, o) : o());
                    };
                }
                function E(e, t) {
                    var i = e.iterator[t.method];
                    if (void 0 === i) {
                        if (((t.delegate = null), "throw" === t.method)) {
                            if (
                                e.iterator.return &&
                                ((t.method = "return"),
                                (t.arg = void 0),
                                E(e, t),
                                "throw" === t.method)
                            )
                                return d;
                            (t.method = "throw"),
                                (t.arg = new TypeError(
                                    "The iterator does not provide a 'throw' method"
                                ));
                        }
                        return d;
                    }
                    var n = h(i, e.iterator, t.arg);
                    if ("throw" === n.type)
                        return (
                            (t.method = "throw"),
                            (t.arg = n.arg),
                            (t.delegate = null),
                            d
                        );
                    var r = n.arg;
                    return r
                        ? r.done
                            ? ((t[e.resultName] = r.value),
                              (t.next = e.nextLoc),
                              "return" !== t.method &&
                                  ((t.method = "next"), (t.arg = void 0)),
                              (t.delegate = null),
                              d)
                            : r
                        : ((t.method = "throw"),
                          (t.arg = new TypeError(
                              "iterator result is not an object"
                          )),
                          (t.delegate = null),
                          d);
                }
                function b(e) {
                    var t = {
                        tryLoc: e[0]
                    };
                    1 in e && (t.catchLoc = e[1]),
                        2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])),
                        this.tryEntries.push(t);
                }
                function O(e) {
                    var t = e.completion || {};
                    (t.type = "normal"), delete t.arg, (e.completion = t);
                }
                function R(e) {
                    (this.tryEntries = [
                        {
                            tryLoc: "root"
                        }
                    ]),
                        e.forEach(b, this),
                        this.reset(!0);
                }
                function k(e) {
                    if (e) {
                        var t = e[o];
                        if (t) return t.call(e);
                        if ("function" == typeof e.next) return e;
                        if (!isNaN(e.length)) {
                            var i = -1,
                                n = function t() {
                                    for (; ++i < e.length; )
                                        if (s.call(e, i))
                                            return (
                                                (t.value = e[i]),
                                                (t.done = !1),
                                                t
                                            );
                                    return (t.value = void 0), (t.done = !0), t;
                                };
                            return (n.next = n);
                        }
                    }
                    return {
                        next: I
                    };
                }
                function I() {
                    return {
                        value: void 0,
                        done: !0
                    };
                }
                return (
                    (y.prototype = g),
                    c(_, "constructor", g),
                    c(g, "constructor", y),
                    (y.displayName = c(g, u, "GeneratorFunction")),
                    (t.isGeneratorFunction = function(e) {
                        var t = "function" == typeof e && e.constructor;
                        return (
                            !!t &&
                            (t === y ||
                                "GeneratorFunction" ===
                                    (t.displayName || t.name))
                        );
                    }),
                    (t.mark = function(e) {
                        return (
                            Object.setPrototypeOf
                                ? Object.setPrototypeOf(e, g)
                                : ((e.__proto__ = g),
                                  c(e, u, "GeneratorFunction")),
                            (e.prototype = Object.create(_)),
                            e
                        );
                    }),
                    (t.awrap = function(e) {
                        return {
                            __await: e
                        };
                    }),
                    S(T.prototype),
                    c(T.prototype, l, function() {
                        return this;
                    }),
                    (t.AsyncIterator = T),
                    (t.async = function(e, i, n, r, s) {
                        void 0 === s && (s = Promise);
                        var a = new T(p(e, i, n, r), s);
                        return t.isGeneratorFunction(i)
                            ? a
                            : a.next().then(function(e) {
                                  return e.done ? e.value : a.next();
                              });
                    }),
                    S(_),
                    c(_, u, "Generator"),
                    c(_, o, function() {
                        return this;
                    }),
                    c(_, "toString", function() {
                        return "[object Generator]";
                    }),
                    (t.keys = function(e) {
                        var t = [];
                        for (var i in e) t.push(i);
                        return (
                            t.reverse(),
                            function i() {
                                for (; t.length; ) {
                                    var n = t.pop();
                                    if (n in e)
                                        return (i.value = n), (i.done = !1), i;
                                }
                                return (i.done = !0), i;
                            }
                        );
                    }),
                    (t.values = k),
                    (R.prototype = {
                        constructor: R,
                        reset: function(e) {
                            if (
                                ((this.prev = 0),
                                (this.next = 0),
                                (this.sent = this._sent = void 0),
                                (this.done = !1),
                                (this.delegate = null),
                                (this.method = "next"),
                                (this.arg = void 0),
                                this.tryEntries.forEach(O),
                                !e)
                            )
                                for (var t in this)
                                    "t" === t.charAt(0) &&
                                        s.call(this, t) &&
                                        !isNaN(+t.slice(1)) &&
                                        (this[t] = void 0);
                        },
                        stop: function() {
                            this.done = !0;
                            var e = this.tryEntries[0].completion;
                            if ("throw" === e.type) throw e.arg;
                            return this.rval;
                        },
                        dispatchException: function(e) {
                            if (this.done) throw e;
                            var t = this;
                            function i(i, n) {
                                return (
                                    (a.type = "throw"),
                                    (a.arg = e),
                                    (t.next = i),
                                    n &&
                                        ((t.method = "next"), (t.arg = void 0)),
                                    !!n
                                );
                            }
                            for (
                                var n = this.tryEntries.length - 1;
                                n >= 0;
                                --n
                            ) {
                                var r = this.tryEntries[n],
                                    a = r.completion;
                                if ("root" === r.tryLoc) return i("end");
                                if (r.tryLoc <= this.prev) {
                                    var o = s.call(r, "catchLoc"),
                                        l = s.call(r, "finallyLoc");
                                    if (o && l) {
                                        if (this.prev < r.catchLoc)
                                            return i(r.catchLoc, !0);
                                        if (this.prev < r.finallyLoc)
                                            return i(r.finallyLoc);
                                    } else if (o) {
                                        if (this.prev < r.catchLoc)
                                            return i(r.catchLoc, !0);
                                    } else {
                                        if (!l)
                                            throw new Error(
                                                "try statement without catch or finally"
                                            );
                                        if (this.prev < r.finallyLoc)
                                            return i(r.finallyLoc);
                                    }
                                }
                            }
                        },
                        abrupt: function(e, t) {
                            for (
                                var i = this.tryEntries.length - 1;
                                i >= 0;
                                --i
                            ) {
                                var n = this.tryEntries[i];
                                if (
                                    n.tryLoc <= this.prev &&
                                    s.call(n, "finallyLoc") &&
                                    this.prev < n.finallyLoc
                                ) {
                                    var r = n;
                                    break;
                                }
                            }
                            r &&
                                ("break" === e || "continue" === e) &&
                                r.tryLoc <= t &&
                                t <= r.finallyLoc &&
                                (r = null);
                            var a = r ? r.completion : {};
                            return (
                                (a.type = e),
                                (a.arg = t),
                                r
                                    ? ((this.method = "next"),
                                      (this.next = r.finallyLoc),
                                      d)
                                    : this.complete(a)
                            );
                        },
                        complete: function(e, t) {
                            if ("throw" === e.type) throw e.arg;
                            return (
                                "break" === e.type || "continue" === e.type
                                    ? (this.next = e.arg)
                                    : "return" === e.type
                                    ? ((this.rval = this.arg = e.arg),
                                      (this.method = "return"),
                                      (this.next = "end"))
                                    : "normal" === e.type &&
                                      t &&
                                      (this.next = t),
                                d
                            );
                        },
                        finish: function(e) {
                            for (
                                var t = this.tryEntries.length - 1;
                                t >= 0;
                                --t
                            ) {
                                var i = this.tryEntries[t];
                                if (i.finallyLoc === e)
                                    return (
                                        this.complete(i.completion, i.afterLoc),
                                        O(i),
                                        d
                                    );
                            }
                        },
                        catch: function(e) {
                            for (
                                var t = this.tryEntries.length - 1;
                                t >= 0;
                                --t
                            ) {
                                var i = this.tryEntries[t];
                                if (i.tryLoc === e) {
                                    var n = i.completion;
                                    if ("throw" === n.type) {
                                        var r = n.arg;
                                        O(i);
                                    }
                                    return r;
                                }
                            }
                            throw new Error("illegal catch attempt");
                        },
                        delegateYield: function(e, t, i) {
                            return (
                                (this.delegate = {
                                    iterator: k(e),
                                    resultName: t,
                                    nextLoc: i
                                }),
                                "next" === this.method && (this.arg = void 0),
                                d
                            );
                        }
                    }),
                    t
                );
            }
            (e.exports = r),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t, i) {
            var n = i(14);
            (e.exports = function(e) {
                if (Array.isArray(e)) return n(e);
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            (e.exports = function(e) {
                if (
                    ("undefined" != typeof Symbol &&
                        null != e[Symbol.iterator]) ||
                    null != e["@@iterator"]
                )
                    return Array.from(e);
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t, i) {
            var n = i(14);
            (e.exports = function(e, t) {
                if (e) {
                    if ("string" == typeof e) return n(e, t);
                    var i = Object.prototype.toString.call(e).slice(8, -1);
                    return (
                        "Object" === i &&
                            e.constructor &&
                            (i = e.constructor.name),
                        "Map" === i || "Set" === i
                            ? Array.from(e)
                            : "Arguments" === i ||
                              /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
                            ? n(e, t)
                            : void 0
                    );
                }
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            (e.exports = function() {
                throw new TypeError(
                    "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
                );
            }),
                (e.exports.__esModule = !0),
                (e.exports.default = e.exports);
        },
        function(e, t) {
            var i, n;
            (i =
                "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),
                (n = {
                    rotl: function(e, t) {
                        return (e << t) | (e >>> (32 - t));
                    },
                    rotr: function(e, t) {
                        return (e << (32 - t)) | (e >>> t);
                    },
                    endian: function(e) {
                        if (e.constructor == Number)
                            return (
                                (16711935 & n.rotl(e, 8)) |
                                (4278255360 & n.rotl(e, 24))
                            );
                        for (var t = 0; t < e.length; t++)
                            e[t] = n.endian(e[t]);
                        return e;
                    },
                    randomBytes: function(e) {
                        for (var t = []; e > 0; e--)
                            t.push(Math.floor(256 * Math.random()));
                        return t;
                    },
                    bytesToWords: function(e) {
                        for (
                            var t = [], i = 0, n = 0;
                            i < e.length;
                            i++, n += 8
                        )
                            t[n >>> 5] |= e[i] << (24 - (n % 32));
                        return t;
                    },
                    wordsToBytes: function(e) {
                        for (var t = [], i = 0; i < 32 * e.length; i += 8)
                            t.push((e[i >>> 5] >>> (24 - (i % 32))) & 255);
                        return t;
                    },
                    bytesToHex: function(e) {
                        for (var t = [], i = 0; i < e.length; i++)
                            t.push((e[i] >>> 4).toString(16)),
                                t.push((15 & e[i]).toString(16));
                        return t.join("");
                    },
                    hexToBytes: function(e) {
                        for (var t = [], i = 0; i < e.length; i += 2)
                            t.push(parseInt(e.substr(i, 2), 16));
                        return t;
                    },
                    bytesToBase64: function(e) {
                        for (var t = [], n = 0; n < e.length; n += 3)
                            for (
                                var r =
                                        (e[n] << 16) |
                                        (e[n + 1] << 8) |
                                        e[n + 2],
                                    s = 0;
                                s < 4;
                                s++
                            )
                                8 * n + 6 * s <= 8 * e.length
                                    ? t.push(
                                          i.charAt((r >>> (6 * (3 - s))) & 63)
                                      )
                                    : t.push("=");
                        return t.join("");
                    },
                    base64ToBytes: function(e) {
                        e = e.replace(/[^A-Z0-9+\/]/gi, "");
                        for (
                            var t = [], n = 0, r = 0;
                            n < e.length;
                            r = ++n % 4
                        )
                            0 != r &&
                                t.push(
                                    ((i.indexOf(e.charAt(n - 1)) &
                                        (Math.pow(2, -2 * r + 8) - 1)) <<
                                        (2 * r)) |
                                        (i.indexOf(e.charAt(n)) >>> (6 - 2 * r))
                                );
                        return t;
                    }
                }),
                (e.exports = n);
        },
        function(e, t) {
            function i(e) {
                return (
                    !!e.constructor &&
                    "function" == typeof e.constructor.isBuffer &&
                    e.constructor.isBuffer(e)
                );
            }
            /*!
             * Determine if an object is a Buffer
             *
             * @author   Feross Aboukhadijeh <https://feross.org>
             * @license  MIT
             */
            e.exports = function(e) {
                return (
                    null != e &&
                    (i(e) ||
                        (function(e) {
                            return (
                                "function" == typeof e.readFloatLE &&
                                "function" == typeof e.slice &&
                                i(e.slice(0, 0))
                            );
                        })(e) ||
                        !!e._isBuffer)
                );
            };
        },
        function(e, t, i) {
            var n;
            /*!
             * EventEmitter v5.2.9 - git.io/ee
             * Unlicense - http://unlicense.org/
             * Oliver Caldwell - https://oli.me.uk/
             * @preserve
             */
            !(function(t) {
                "use strict";

                function r() {}
                var s = r.prototype,
                    a = t.EventEmitter;
                function o(e, t) {
                    for (var i = e.length; i--; )
                        if (e[i].listener === t) return i;
                    return -1;
                }
                function l(e) {
                    return function() {
                        return this[e].apply(this, arguments);
                    };
                }
                (s.getListeners = function(e) {
                    var t,
                        i,
                        n = this._getEvents();
                    if (e instanceof RegExp)
                        for (i in ((t = {}), n))
                            n.hasOwnProperty(i) && e.test(i) && (t[i] = n[i]);
                    else t = n[e] || (n[e] = []);
                    return t;
                }),
                    (s.flattenListeners = function(e) {
                        var t,
                            i = [];
                        for (t = 0; t < e.length; t += 1) i.push(e[t].listener);
                        return i;
                    }),
                    (s.getListenersAsObject = function(e) {
                        var t,
                            i = this.getListeners(e);
                        return i instanceof Array && ((t = {})[e] = i), t || i;
                    }),
                    (s.addListener = function(e, t) {
                        if (
                            !(function e(t) {
                                return (
                                    "function" == typeof t ||
                                    t instanceof RegExp ||
                                    (!(!t || "object" != typeof t) &&
                                        e(t.listener))
                                );
                            })(t)
                        )
                            throw new TypeError("listener must be a function");
                        var i,
                            n = this.getListenersAsObject(e),
                            r = "object" == typeof t;
                        for (i in n)
                            n.hasOwnProperty(i) &&
                                -1 === o(n[i], t) &&
                                n[i].push(
                                    r
                                        ? t
                                        : {
                                              listener: t,
                                              once: !1
                                          }
                                );
                        return this;
                    }),
                    (s.on = l("addListener")),
                    (s.addOnceListener = function(e, t) {
                        return this.addListener(e, {
                            listener: t,
                            once: !0
                        });
                    }),
                    (s.once = l("addOnceListener")),
                    (s.defineEvent = function(e) {
                        return this.getListeners(e), this;
                    }),
                    (s.defineEvents = function(e) {
                        for (var t = 0; t < e.length; t += 1)
                            this.defineEvent(e[t]);
                        return this;
                    }),
                    (s.removeListener = function(e, t) {
                        var i,
                            n,
                            r = this.getListenersAsObject(e);
                        for (n in r)
                            r.hasOwnProperty(n) &&
                                -1 !== (i = o(r[n], t)) &&
                                r[n].splice(i, 1);
                        return this;
                    }),
                    (s.off = l("removeListener")),
                    (s.addListeners = function(e, t) {
                        return this.manipulateListeners(!1, e, t);
                    }),
                    (s.removeListeners = function(e, t) {
                        return this.manipulateListeners(!0, e, t);
                    }),
                    (s.manipulateListeners = function(e, t, i) {
                        var n,
                            r,
                            s = e ? this.removeListener : this.addListener,
                            a = e ? this.removeListeners : this.addListeners;
                        if ("object" != typeof t || t instanceof RegExp)
                            for (n = i.length; n--; ) s.call(this, t, i[n]);
                        else
                            for (n in t)
                                t.hasOwnProperty(n) &&
                                    (r = t[n]) &&
                                    ("function" == typeof r
                                        ? s.call(this, n, r)
                                        : a.call(this, n, r));
                        return this;
                    }),
                    (s.removeEvent = function(e) {
                        var t,
                            i = typeof e,
                            n = this._getEvents();
                        if ("string" === i) delete n[e];
                        else if (e instanceof RegExp)
                            for (t in n)
                                n.hasOwnProperty(t) && e.test(t) && delete n[t];
                        else delete this._events;
                        return this;
                    }),
                    (s.removeAllListeners = l("removeEvent")),
                    (s.emitEvent = function(e, t) {
                        var i,
                            n,
                            r,
                            s,
                            a = this.getListenersAsObject(e);
                        for (s in a)
                            if (a.hasOwnProperty(s))
                                for (
                                    i = a[s].slice(0), r = 0;
                                    r < i.length;
                                    r++
                                )
                                    !0 === (n = i[r]).once &&
                                        this.removeListener(e, n.listener),
                                        n.listener.apply(this, t || []) ===
                                            this._getOnceReturnValue() &&
                                            this.removeListener(e, n.listener);
                        return this;
                    }),
                    (s.trigger = l("emitEvent")),
                    (s.emit = function(e) {
                        var t = Array.prototype.slice.call(arguments, 1);
                        return this.emitEvent(e, t);
                    }),
                    (s.setOnceReturnValue = function(e) {
                        return (this._onceReturnValue = e), this;
                    }),
                    (s._getOnceReturnValue = function() {
                        return (
                            !this.hasOwnProperty("_onceReturnValue") ||
                            this._onceReturnValue
                        );
                    }),
                    (s._getEvents = function() {
                        return this._events || (this._events = {});
                    }),
                    (r.noConflict = function() {
                        return (t.EventEmitter = a), r;
                    }),
                    void 0 ===
                        (n = function() {
                            return r;
                        }.call(t, i, t, e)) || (e.exports = n);
            })("undefined" != typeof window ? window : this || {});
        },
        function(e, t, i) {
            var n = i(9).default,
                r = i(16),
                s = function(e) {
                    (this.item = null),
                        e &&
                            void 0 !== e.item &&
                            null !== e.item &&
                            (this.item = new r(e.item));
                };
            ((s.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.item = new r()), this.item.read(e))
                                : e.skip(i);
                            break;
                        case 0:
                            e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (s.prototype.write = function(e) {
                    e.writeStructBegin("ReportService_Report_args"),
                        null !== this.item &&
                            void 0 !== this.item &&
                            (e.writeFieldBegin("item", n.Type.STRUCT, 1),
                            this.item.write(e),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var a = function(e) {};
            ((a.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype);
                    t.fid;
                    if (i == n.Type.STOP) break;
                    e.skip(i), e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (a.prototype.write = function(e) {
                    e.writeStructBegin("ReportService_Report_result"),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var o = function(e, t) {
                (this.input = e), (this.output = t || e), (this.seqid = 0);
            };
            ((o.prototype = {}).Report = function(e, t) {
                this.send_Report(e, t), t || this.recv_Report();
            }),
                (o.prototype.send_Report = function(e, t) {
                    if (
                        (this.output.writeMessageBegin(
                            "Report",
                            n.MessageType.CALL,
                            this.seqid
                        ),
                        new s({
                            item: e
                        }).write(this.output),
                        this.output.writeMessageEnd(),
                        !t)
                    )
                        return this.output.getTransport().flush();
                    this.output.getTransport().flush(!0, function(e) {
                        t(e);
                    });
                }),
                (o.prototype.recv_Report = function() {
                    var e = this.input.readMessageBegin(),
                        t = (e.fname, e.mtype);
                    e.rseqid;
                    if (t == n.MessageType.EXCEPTION) {
                        var i = new n.TApplicationException();
                        throw (i.read(this.input),
                        this.input.readMessageEnd(),
                        i);
                    }
                    new a().read(this.input), this.input.readMessageEnd();
                }),
                (e.exports = {
                    ReportService_Report_args: s,
                    ReportService_Report_result: a,
                    ReportServiceClient: o
                });
        },
        function(e, t, i) {
            var n = i(9).default,
                r = i(17).VosdkHeader,
                s = function(e) {
                    (this.header = null),
                        (this.appid = null),
                        (this.uname = null),
                        (this.ver = null),
                        (this.dk = null),
                        (this.details = null),
                        e &&
                            (void 0 !== e.header &&
                                null !== e.header &&
                                (this.header = new r(e.header)),
                            void 0 !== e.appid &&
                                null !== e.appid &&
                                (this.appid = e.appid),
                            void 0 !== e.uname &&
                                null !== e.uname &&
                                (this.uname = e.uname),
                            void 0 !== e.ver &&
                                null !== e.ver &&
                                (this.ver = e.ver),
                            void 0 !== e.dk &&
                                null !== e.dk &&
                                (this.dk = e.dk),
                            void 0 !== e.details &&
                                null !== e.details &&
                                (this.details = e.details));
                };
            ((s.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.appid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.uname = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.ver = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.dk = e.readString().value)
                                : e.skip(i);
                            break;
                        case 6:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (s.prototype.write = function(e) {
                    e.writeStructBegin("MiniappSession"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.appid &&
                            void 0 !== this.appid &&
                            (e.writeFieldBegin("appid", n.Type.STRING, 2),
                            e.writeString(this.appid),
                            e.writeFieldEnd()),
                        null !== this.uname &&
                            void 0 !== this.uname &&
                            (e.writeFieldBegin("uname", n.Type.STRING, 3),
                            e.writeString(this.uname),
                            e.writeFieldEnd()),
                        null !== this.ver &&
                            void 0 !== this.ver &&
                            (e.writeFieldBegin("ver", n.Type.STRING, 4),
                            e.writeString(this.ver),
                            e.writeFieldEnd()),
                        null !== this.dk &&
                            void 0 !== this.dk &&
                            (e.writeFieldBegin("dk", n.Type.STRING, 5),
                            e.writeString(this.dk),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 6),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var a = function(e) {
                (this.header = null),
                    (this.csurl = null),
                    (this.ec = null),
                    (this.gatewaylist = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.csurl &&
                            null !== e.csurl &&
                            (this.csurl = e.csurl),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.gatewaylist &&
                            null !== e.gatewaylist &&
                            (this.gatewaylist = n.copyList(e.gatewaylist, [
                                null
                            ])),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((a.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.csurl = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            if (i == n.Type.LIST) {
                                var a, o;
                                this.gatewaylist = [];
                                (o = e.readListBegin()).etype, (a = o.size);
                                for (var l = 0; l < a; ++l) {
                                    var u;
                                    (u = e.readString().value),
                                        this.gatewaylist.push(u);
                                }
                                e.readListEnd();
                            } else e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (a.prototype.write = function(e) {
                    if (
                        (e.writeStructBegin("MiniappJoinChooseServer"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.csurl &&
                            void 0 !== this.csurl &&
                            (e.writeFieldBegin("csurl", n.Type.STRING, 2),
                            e.writeString(this.csurl),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 3),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.gatewaylist &&
                            void 0 !== this.gatewaylist)
                    ) {
                        for (var t in (e.writeFieldBegin(
                            "gatewaylist",
                            n.Type.LIST,
                            4
                        ),
                        e.writeListBegin(
                            n.Type.STRING,
                            this.gatewaylist.length
                        ),
                        this.gatewaylist))
                            this.gatewaylist.hasOwnProperty(t) &&
                                ((t = this.gatewaylist[t]), e.writeString(t));
                        e.writeListEnd(), e.writeFieldEnd();
                    }
                    null !== this.details &&
                        void 0 !== this.details &&
                        (e.writeFieldBegin("details", n.Type.STRING, 5),
                        e.writeString(this.details),
                        e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var o = function(e) {
                (this.header = null),
                    (this.gateway = null),
                    (this.ec = null),
                    (this.wsurl = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.gateway &&
                            null !== e.gateway &&
                            (this.gateway = e.gateway),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.wsurl &&
                            null !== e.wsurl &&
                            (this.wsurl = e.wsurl),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((o.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.gateway = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.wsurl = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (o.prototype.write = function(e) {
                    e.writeStructBegin("MiniappConnectWebSocket"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.gateway &&
                            void 0 !== this.gateway &&
                            (e.writeFieldBegin("gateway", n.Type.STRING, 2),
                            e.writeString(this.gateway),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 3),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.wsurl &&
                            void 0 !== this.wsurl &&
                            (e.writeFieldBegin("wsurl", n.Type.STRING, 4),
                            e.writeString(this.wsurl),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 5),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var l = function(e) {
                (this.header = null),
                    (this.uid = null),
                    (this.ec = null),
                    (this.isrejoin = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.uid &&
                            null !== e.uid &&
                            (this.uid = e.uid),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.isrejoin &&
                            null !== e.isrejoin &&
                            (this.isrejoin = e.isrejoin),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((l.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.uid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.BOOL
                                ? (this.isrejoin = e.readBool().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (l.prototype.write = function(e) {
                    e.writeStructBegin("MiniappJoin"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.uid &&
                            void 0 !== this.uid &&
                            (e.writeFieldBegin("uid", n.Type.STRING, 2),
                            e.writeString(this.uid),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 3),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.isrejoin &&
                            void 0 !== this.isrejoin &&
                            (e.writeFieldBegin("isrejoin", n.Type.BOOL, 4),
                            e.writeBool(this.isrejoin),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 5),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var u = function(e) {
                (this.header = null),
                    (this.ec = null),
                    (this.pushurl = null),
                    (this.uid = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.pushurl &&
                            null !== e.pushurl &&
                            (this.pushurl = e.pushurl),
                        void 0 !== e.uid &&
                            null !== e.uid &&
                            (this.uid = e.uid),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((u.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.pushurl = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.uid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (u.prototype.write = function(e) {
                    e.writeStructBegin("MiniappPublish"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 2),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.pushurl &&
                            void 0 !== this.pushurl &&
                            (e.writeFieldBegin("pushurl", n.Type.STRING, 3),
                            e.writeString(this.pushurl),
                            e.writeFieldEnd()),
                        null !== this.uid &&
                            void 0 !== this.uid &&
                            (e.writeFieldBegin("uid", n.Type.STRING, 4),
                            e.writeString(this.uid),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 5),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var c = function(e) {
                (this.header = null),
                    (this.ec = null),
                    (this.uid = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.uid &&
                            null !== e.uid &&
                            (this.uid = e.uid),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((c.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.uid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (c.prototype.write = function(e) {
                    e.writeStructBegin("MiniappUnpublish"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 2),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.uid &&
                            void 0 !== this.uid &&
                            (e.writeFieldBegin("uid", n.Type.STRING, 3),
                            e.writeString(this.uid),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 5),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var p = function(e) {
                (this.header = null),
                    (this.ec = null),
                    (this.pullurl = null),
                    (this.peerid = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.pullurl &&
                            null !== e.pullurl &&
                            (this.pullurl = e.pullurl),
                        void 0 !== e.peerid &&
                            null !== e.peerid &&
                            (this.peerid = e.peerid),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((p.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.pullurl = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.peerid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (p.prototype.write = function(e) {
                    e.writeStructBegin("MiniappSubscribe"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 2),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.pullurl &&
                            void 0 !== this.pullurl &&
                            (e.writeFieldBegin("pullurl", n.Type.STRING, 3),
                            e.writeString(this.pullurl),
                            e.writeFieldEnd()),
                        null !== this.peerid &&
                            void 0 !== this.peerid &&
                            (e.writeFieldBegin("peerid", n.Type.STRING, 4),
                            e.writeString(this.peerid),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 5),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var h = function(e) {
                (this.header = null),
                    (this.ec = null),
                    (this.peerid = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.ec && null !== e.ec && (this.ec = e.ec),
                        void 0 !== e.peerid &&
                            null !== e.peerid &&
                            (this.peerid = e.peerid),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((h.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.ec = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.peerid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (h.prototype.write = function(e) {
                    e.writeStructBegin("MiniappUnsubscribe"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.ec &&
                            void 0 !== this.ec &&
                            (e.writeFieldBegin("ec", n.Type.STRING, 2),
                            e.writeString(this.ec),
                            e.writeFieldEnd()),
                        null !== this.peerid &&
                            void 0 !== this.peerid &&
                            (e.writeFieldBegin("peerid", n.Type.STRING, 3),
                            e.writeString(this.peerid),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 4),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var d = function(e) {
                (this.header = null),
                    (this.uid = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.uid &&
                            null !== e.uid &&
                            (this.uid = e.uid),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((d.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.uid = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (d.prototype.write = function(e) {
                    e.writeStructBegin("MiniappLeave"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.uid &&
                            void 0 !== this.uid &&
                            (e.writeFieldBegin("uid", n.Type.STRING, 2),
                            e.writeString(this.uid),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 3),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var f = function(e) {
                (this.header = null),
                    (this.action = null),
                    (this.details = null),
                    (this.req_ts = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.action &&
                            null !== e.action &&
                            (this.action = e.action),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details),
                        void 0 !== e.req_ts &&
                            null !== e.req_ts &&
                            (this.req_ts = e.req_ts));
            };
            ((f.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.action = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.I64
                                ? (this.req_ts = e.readI64().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (f.prototype.write = function(e) {
                    e.writeStructBegin("MiniappServerEvent"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.action &&
                            void 0 !== this.action &&
                            (e.writeFieldBegin("action", n.Type.STRING, 2),
                            e.writeString(this.action),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 3),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        null !== this.req_ts &&
                            void 0 !== this.req_ts &&
                            (e.writeFieldBegin("req_ts", n.Type.I64, 4),
                            e.writeI64(this.req_ts),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var y = function(e) {
                (this.header = null),
                    (this.url = null),
                    (this.code = null),
                    (this.status = null),
                    (this.error = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.url &&
                            null !== e.url &&
                            (this.url = e.url),
                        void 0 !== e.code &&
                            null !== e.code &&
                            (this.code = e.code),
                        void 0 !== e.status &&
                            null !== e.status &&
                            (this.status = e.status),
                        void 0 !== e.error &&
                            null !== e.error &&
                            (this.error = e.error),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((y.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.url = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.code = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.status = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.error = e.readString().value)
                                : e.skip(i);
                            break;
                        case 6:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (y.prototype.write = function(e) {
                    e.writeStructBegin("MiniappPusherState"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.url &&
                            void 0 !== this.url &&
                            (e.writeFieldBegin("url", n.Type.STRING, 2),
                            e.writeString(this.url),
                            e.writeFieldEnd()),
                        null !== this.code &&
                            void 0 !== this.code &&
                            (e.writeFieldBegin("code", n.Type.STRING, 3),
                            e.writeString(this.code),
                            e.writeFieldEnd()),
                        null !== this.status &&
                            void 0 !== this.status &&
                            (e.writeFieldBegin("status", n.Type.STRING, 4),
                            e.writeString(this.status),
                            e.writeFieldEnd()),
                        null !== this.error &&
                            void 0 !== this.error &&
                            (e.writeFieldBegin("error", n.Type.STRING, 5),
                            e.writeString(this.error),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 6),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                });
            var g = function(e) {
                (this.header = null),
                    (this.url = null),
                    (this.code = null),
                    (this.status = null),
                    (this.error = null),
                    (this.details = null),
                    e &&
                        (void 0 !== e.header &&
                            null !== e.header &&
                            (this.header = new r(e.header)),
                        void 0 !== e.url &&
                            null !== e.url &&
                            (this.url = e.url),
                        void 0 !== e.code &&
                            null !== e.code &&
                            (this.code = e.code),
                        void 0 !== e.status &&
                            null !== e.status &&
                            (this.status = e.status),
                        void 0 !== e.error &&
                            null !== e.error &&
                            (this.error = e.error),
                        void 0 !== e.details &&
                            null !== e.details &&
                            (this.details = e.details));
            };
            ((g.prototype = {}).read = function(e) {
                for (e.readStructBegin(); ; ) {
                    var t = e.readFieldBegin(),
                        i = (t.fname, t.ftype),
                        s = t.fid;
                    if (i == n.Type.STOP) break;
                    switch (s) {
                        case 1:
                            i == n.Type.STRUCT
                                ? ((this.header = new r()), this.header.read(e))
                                : e.skip(i);
                            break;
                        case 2:
                            i == n.Type.STRING
                                ? (this.url = e.readString().value)
                                : e.skip(i);
                            break;
                        case 3:
                            i == n.Type.STRING
                                ? (this.code = e.readString().value)
                                : e.skip(i);
                            break;
                        case 4:
                            i == n.Type.STRING
                                ? (this.status = e.readString().value)
                                : e.skip(i);
                            break;
                        case 5:
                            i == n.Type.STRING
                                ? (this.error = e.readString().value)
                                : e.skip(i);
                            break;
                        case 6:
                            i == n.Type.STRING
                                ? (this.details = e.readString().value)
                                : e.skip(i);
                            break;
                        default:
                            e.skip(i);
                    }
                    e.readFieldEnd();
                }
                e.readStructEnd();
            }),
                (g.prototype.write = function(e) {
                    e.writeStructBegin("MiniappPlayerState"),
                        null !== this.header &&
                            void 0 !== this.header &&
                            (e.writeFieldBegin("header", n.Type.STRUCT, 1),
                            this.header.write(e),
                            e.writeFieldEnd()),
                        null !== this.url &&
                            void 0 !== this.url &&
                            (e.writeFieldBegin("url", n.Type.STRING, 2),
                            e.writeString(this.url),
                            e.writeFieldEnd()),
                        null !== this.code &&
                            void 0 !== this.code &&
                            (e.writeFieldBegin("code", n.Type.STRING, 3),
                            e.writeString(this.code),
                            e.writeFieldEnd()),
                        null !== this.status &&
                            void 0 !== this.status &&
                            (e.writeFieldBegin("status", n.Type.STRING, 4),
                            e.writeString(this.status),
                            e.writeFieldEnd()),
                        null !== this.error &&
                            void 0 !== this.error &&
                            (e.writeFieldBegin("error", n.Type.STRING, 5),
                            e.writeString(this.error),
                            e.writeFieldEnd()),
                        null !== this.details &&
                            void 0 !== this.details &&
                            (e.writeFieldBegin("details", n.Type.STRING, 6),
                            e.writeString(this.details),
                            e.writeFieldEnd()),
                        e.writeFieldStop(),
                        e.writeStructEnd();
                }),
                (e.exports = {
                    MiniappSession: s,
                    MiniappJoinChooseServer: a,
                    MiniappConnectWebSocket: o,
                    MiniappJoin: l,
                    MiniappPublish: u,
                    MiniappUnpublish: c,
                    MiniappSubscribe: p,
                    MiniappUnsubscribe: h,
                    MiniappLeave: d,
                    MiniappServerEvent: f,
                    MiniappPusherState: y,
                    MiniappPlayerState: g
                });
        },
        function(e, t, i) {
            "use strict";

            e.exports = i(37);
        },
        function(e, t, i) {
            "use strict";

            var n = t;
            function r() {
                n.util._configure(),
                    n.Writer._configure(n.BufferWriter),
                    n.Reader._configure(n.BufferReader);
            }
            (n.build = "minimal"),
                (n.Writer = i(18)),
                (n.BufferWriter = i(47)),
                (n.Reader = i(19)),
                (n.BufferReader = i(48)),
                (n.util = i(7)),
                (n.rpc = i(49)),
                (n.roots = i(51)),
                (n.configure = r),
                r();
        },
        function(e, t) {
            var i;
            i = (function() {
                return this;
            })();
            try {
                i = i || new Function("return this")();
            } catch (e) {
                "object" == typeof window && (i = window);
            }
            e.exports = i;
        },
        function(e, t, i) {
            "use strict";

            e.exports = function(e, t) {
                var i = new Array(arguments.length - 1),
                    n = 0,
                    r = 2,
                    s = !0;
                for (; r < arguments.length; ) i[n++] = arguments[r++];
                return new Promise(function(r, a) {
                    i[n] = function(e) {
                        if (s)
                            if (((s = !1), e)) a(e);
                            else {
                                for (
                                    var t = new Array(arguments.length - 1),
                                        i = 0;
                                    i < t.length;

                                )
                                    t[i++] = arguments[i];
                                r.apply(null, t);
                            }
                    };
                    try {
                        e.apply(t || null, i);
                    } catch (e) {
                        s && ((s = !1), a(e));
                    }
                });
            };
        },
        function(e, t, i) {
            "use strict";

            var n = t;
            n.length = function(e) {
                var t = e.length;
                if (!t) return 0;
                for (var i = 0; --t % 4 > 1 && "=" === e.charAt(t); ) ++i;
                return Math.ceil(3 * e.length) / 4 - i;
            };
            for (var r = new Array(64), s = new Array(123), a = 0; a < 64; )
                s[
                    (r[a] =
                        a < 26
                            ? a + 65
                            : a < 52
                            ? a + 71
                            : a < 62
                            ? a - 4
                            : (a - 59) | 43)
                ] = a++;
            n.encode = function(e, t, i) {
                for (var n, s = null, a = [], o = 0, l = 0; t < i; ) {
                    var u = e[t++];
                    switch (l) {
                        case 0:
                            (a[o++] = r[u >> 2]), (n = (3 & u) << 4), (l = 1);
                            break;
                        case 1:
                            (a[o++] = r[n | (u >> 4)]),
                                (n = (15 & u) << 2),
                                (l = 2);
                            break;
                        case 2:
                            (a[o++] = r[n | (u >> 6)]),
                                (a[o++] = r[63 & u]),
                                (l = 0);
                    }
                    o > 8191 &&
                        ((s || (s = [])).push(
                            String.fromCharCode.apply(String, a)
                        ),
                        (o = 0));
                }
                return (
                    l &&
                        ((a[o++] = r[n]),
                        (a[o++] = 61),
                        1 === l && (a[o++] = 61)),
                    s
                        ? (o &&
                              s.push(
                                  String.fromCharCode.apply(
                                      String,
                                      a.slice(0, o)
                                  )
                              ),
                          s.join(""))
                        : String.fromCharCode.apply(String, a.slice(0, o))
                );
            };
            (n.decode = function(e, t, i) {
                for (var n, r = i, a = 0, o = 0; o < e.length; ) {
                    var l = e.charCodeAt(o++);
                    if (61 === l && a > 1) break;
                    if (void 0 === (l = s[l])) throw Error("invalid encoding");
                    switch (a) {
                        case 0:
                            (n = l), (a = 1);
                            break;
                        case 1:
                            (t[i++] = (n << 2) | ((48 & l) >> 4)),
                                (n = l),
                                (a = 2);
                            break;
                        case 2:
                            (t[i++] = ((15 & n) << 4) | ((60 & l) >> 2)),
                                (n = l),
                                (a = 3);
                            break;
                        case 3:
                            (t[i++] = ((3 & n) << 6) | l), (a = 0);
                    }
                }
                if (1 === a) throw Error("invalid encoding");
                return i - r;
            }),
                (n.test = function(e) {
                    return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(
                        e
                    );
                });
        },
        function(e, t, i) {
            "use strict";

            function n() {
                this._listeners = {};
            }
            (e.exports = n),
                (n.prototype.on = function(e, t, i) {
                    return (
                        (this._listeners[e] || (this._listeners[e] = [])).push({
                            fn: t,
                            ctx: i || this
                        }),
                        this
                    );
                }),
                (n.prototype.off = function(e, t) {
                    if (void 0 === e) this._listeners = {};
                    else if (void 0 === t) this._listeners[e] = [];
                    else
                        for (var i = this._listeners[e], n = 0; n < i.length; )
                            i[n].fn === t ? i.splice(n, 1) : ++n;
                    return this;
                }),
                (n.prototype.emit = function(e) {
                    var t = this._listeners[e];
                    if (t) {
                        for (var i = [], n = 1; n < arguments.length; )
                            i.push(arguments[n++]);
                        for (n = 0; n < t.length; )
                            t[n].fn.apply(t[n++].ctx, i);
                    }
                    return this;
                });
        },
        function(e, t, i) {
            "use strict";

            function n(e) {
                return (
                    "undefined" != typeof Float32Array
                        ? (function() {
                              var t = new Float32Array([-0]),
                                  i = new Uint8Array(t.buffer),
                                  n = 128 === i[3];
                              function r(e, n, r) {
                                  (t[0] = e),
                                      (n[r] = i[0]),
                                      (n[r + 1] = i[1]),
                                      (n[r + 2] = i[2]),
                                      (n[r + 3] = i[3]);
                              }
                              function s(e, n, r) {
                                  (t[0] = e),
                                      (n[r] = i[3]),
                                      (n[r + 1] = i[2]),
                                      (n[r + 2] = i[1]),
                                      (n[r + 3] = i[0]);
                              }
                              function a(e, n) {
                                  return (
                                      (i[0] = e[n]),
                                      (i[1] = e[n + 1]),
                                      (i[2] = e[n + 2]),
                                      (i[3] = e[n + 3]),
                                      t[0]
                                  );
                              }
                              function o(e, n) {
                                  return (
                                      (i[3] = e[n]),
                                      (i[2] = e[n + 1]),
                                      (i[1] = e[n + 2]),
                                      (i[0] = e[n + 3]),
                                      t[0]
                                  );
                              }
                              (e.writeFloatLE = n ? r : s),
                                  (e.writeFloatBE = n ? s : r),
                                  (e.readFloatLE = n ? a : o),
                                  (e.readFloatBE = n ? o : a);
                          })()
                        : (function() {
                              function t(e, t, i, n) {
                                  var r = t < 0 ? 1 : 0;
                                  if ((r && (t = -t), 0 === t))
                                      e(1 / t > 0 ? 0 : 2147483648, i, n);
                                  else if (isNaN(t)) e(2143289344, i, n);
                                  else if (t > 34028234663852886e22)
                                      e(((r << 31) | 2139095040) >>> 0, i, n);
                                  else if (t < 11754943508222875e-54)
                                      e(
                                          ((r << 31) |
                                              Math.round(
                                                  t / 1401298464324817e-60
                                              )) >>>
                                              0,
                                          i,
                                          n
                                      );
                                  else {
                                      var s = Math.floor(
                                          Math.log(t) / Math.LN2
                                      );
                                      e(
                                          ((r << 31) |
                                              ((s + 127) << 23) |
                                              (8388607 &
                                                  Math.round(
                                                      t *
                                                          Math.pow(2, -s) *
                                                          8388608
                                                  ))) >>>
                                              0,
                                          i,
                                          n
                                      );
                                  }
                              }
                              function i(e, t, i) {
                                  var n = e(t, i),
                                      r = 2 * (n >> 31) + 1,
                                      s = (n >>> 23) & 255,
                                      a = 8388607 & n;
                                  return 255 === s
                                      ? a
                                          ? NaN
                                          : r * (1 / 0)
                                      : 0 === s
                                      ? 1401298464324817e-60 * r * a
                                      : r *
                                        Math.pow(2, s - 150) *
                                        (a + 8388608);
                              }
                              (e.writeFloatLE = t.bind(null, r)),
                                  (e.writeFloatBE = t.bind(null, s)),
                                  (e.readFloatLE = i.bind(null, a)),
                                  (e.readFloatBE = i.bind(null, o));
                          })(),
                    "undefined" != typeof Float64Array
                        ? (function() {
                              var t = new Float64Array([-0]),
                                  i = new Uint8Array(t.buffer),
                                  n = 128 === i[7];
                              function r(e, n, r) {
                                  (t[0] = e),
                                      (n[r] = i[0]),
                                      (n[r + 1] = i[1]),
                                      (n[r + 2] = i[2]),
                                      (n[r + 3] = i[3]),
                                      (n[r + 4] = i[4]),
                                      (n[r + 5] = i[5]),
                                      (n[r + 6] = i[6]),
                                      (n[r + 7] = i[7]);
                              }
                              function s(e, n, r) {
                                  (t[0] = e),
                                      (n[r] = i[7]),
                                      (n[r + 1] = i[6]),
                                      (n[r + 2] = i[5]),
                                      (n[r + 3] = i[4]),
                                      (n[r + 4] = i[3]),
                                      (n[r + 5] = i[2]),
                                      (n[r + 6] = i[1]),
                                      (n[r + 7] = i[0]);
                              }
                              function a(e, n) {
                                  return (
                                      (i[0] = e[n]),
                                      (i[1] = e[n + 1]),
                                      (i[2] = e[n + 2]),
                                      (i[3] = e[n + 3]),
                                      (i[4] = e[n + 4]),
                                      (i[5] = e[n + 5]),
                                      (i[6] = e[n + 6]),
                                      (i[7] = e[n + 7]),
                                      t[0]
                                  );
                              }
                              function o(e, n) {
                                  return (
                                      (i[7] = e[n]),
                                      (i[6] = e[n + 1]),
                                      (i[5] = e[n + 2]),
                                      (i[4] = e[n + 3]),
                                      (i[3] = e[n + 4]),
                                      (i[2] = e[n + 5]),
                                      (i[1] = e[n + 6]),
                                      (i[0] = e[n + 7]),
                                      t[0]
                                  );
                              }
                              (e.writeDoubleLE = n ? r : s),
                                  (e.writeDoubleBE = n ? s : r),
                                  (e.readDoubleLE = n ? a : o),
                                  (e.readDoubleBE = n ? o : a);
                          })()
                        : (function() {
                              function t(e, t, i, n, r, s) {
                                  var a = n < 0 ? 1 : 0;
                                  if ((a && (n = -n), 0 === n))
                                      e(0, r, s + t),
                                          e(
                                              1 / n > 0 ? 0 : 2147483648,
                                              r,
                                              s + i
                                          );
                                  else if (isNaN(n))
                                      e(0, r, s + t), e(2146959360, r, s + i);
                                  else if (n > 17976931348623157e292)
                                      e(0, r, s + t),
                                          e(
                                              ((a << 31) | 2146435072) >>> 0,
                                              r,
                                              s + i
                                          );
                                  else {
                                      var o;
                                      if (n < 22250738585072014e-324)
                                          e((o = n / 5e-324) >>> 0, r, s + t),
                                              e(
                                                  ((a << 31) |
                                                      (o / 4294967296)) >>>
                                                      0,
                                                  r,
                                                  s + i
                                              );
                                      else {
                                          var l = Math.floor(
                                              Math.log(n) / Math.LN2
                                          );
                                          1024 === l && (l = 1023),
                                              e(
                                                  (4503599627370496 *
                                                      (o =
                                                          n *
                                                          Math.pow(2, -l))) >>>
                                                      0,
                                                  r,
                                                  s + t
                                              ),
                                              e(
                                                  ((a << 31) |
                                                      ((l + 1023) << 20) |
                                                      ((1048576 * o) &
                                                          1048575)) >>>
                                                      0,
                                                  r,
                                                  s + i
                                              );
                                      }
                                  }
                              }
                              function i(e, t, i, n, r) {
                                  var s = e(n, r + t),
                                      a = e(n, r + i),
                                      o = 2 * (a >> 31) + 1,
                                      l = (a >>> 20) & 2047,
                                      u = 4294967296 * (1048575 & a) + s;
                                  return 2047 === l
                                      ? u
                                          ? NaN
                                          : o * (1 / 0)
                                      : 0 === l
                                      ? 5e-324 * o * u
                                      : o *
                                        Math.pow(2, l - 1075) *
                                        (u + 4503599627370496);
                              }
                              (e.writeDoubleLE = t.bind(null, r, 0, 4)),
                                  (e.writeDoubleBE = t.bind(null, s, 4, 0)),
                                  (e.readDoubleLE = i.bind(null, a, 0, 4)),
                                  (e.readDoubleBE = i.bind(null, o, 4, 0));
                          })(),
                    e
                );
            }
            function r(e, t, i) {
                (t[i] = 255 & e),
                    (t[i + 1] = (e >>> 8) & 255),
                    (t[i + 2] = (e >>> 16) & 255),
                    (t[i + 3] = e >>> 24);
            }
            function s(e, t, i) {
                (t[i] = e >>> 24),
                    (t[i + 1] = (e >>> 16) & 255),
                    (t[i + 2] = (e >>> 8) & 255),
                    (t[i + 3] = 255 & e);
            }
            function a(e, t) {
                return (
                    (e[t] |
                        (e[t + 1] << 8) |
                        (e[t + 2] << 16) |
                        (e[t + 3] << 24)) >>>
                    0
                );
            }
            function o(e, t) {
                return (
                    ((e[t] << 24) |
                        (e[t + 1] << 16) |
                        (e[t + 2] << 8) |
                        e[t + 3]) >>>
                    0
                );
            }
            e.exports = n(n);
        },
        function(module, exports, __webpack_require__) {
            "use strict";

            function inquire(moduleName) {
                try {
                    var mod = eval("quire".replace(/^/, "re"))(moduleName);
                    if (mod && (mod.length || Object.keys(mod).length))
                        return mod;
                } catch (e) {}
                return null;
            }
            module.exports = inquire;
        },
        function(e, t, i) {
            "use strict";

            var n = t;
            (n.length = function(e) {
                for (var t = 0, i = 0, n = 0; n < e.length; ++n)
                    (i = e.charCodeAt(n)) < 128
                        ? (t += 1)
                        : i < 2048
                        ? (t += 2)
                        : 55296 == (64512 & i) &&
                          56320 == (64512 & e.charCodeAt(n + 1))
                        ? (++n, (t += 4))
                        : (t += 3);
                return t;
            }),
                (n.read = function(e, t, i) {
                    if (i - t < 1) return "";
                    for (var n, r = null, s = [], a = 0; t < i; )
                        (n = e[t++]) < 128
                            ? (s[a++] = n)
                            : n > 191 && n < 224
                            ? (s[a++] = ((31 & n) << 6) | (63 & e[t++]))
                            : n > 239 && n < 365
                            ? ((n =
                                  (((7 & n) << 18) |
                                      ((63 & e[t++]) << 12) |
                                      ((63 & e[t++]) << 6) |
                                      (63 & e[t++])) -
                                  65536),
                              (s[a++] = 55296 + (n >> 10)),
                              (s[a++] = 56320 + (1023 & n)))
                            : (s[a++] =
                                  ((15 & n) << 12) |
                                  ((63 & e[t++]) << 6) |
                                  (63 & e[t++])),
                            a > 8191 &&
                                ((r || (r = [])).push(
                                    String.fromCharCode.apply(String, s)
                                ),
                                (a = 0));
                    return r
                        ? (a &&
                              r.push(
                                  String.fromCharCode.apply(
                                      String,
                                      s.slice(0, a)
                                  )
                              ),
                          r.join(""))
                        : String.fromCharCode.apply(String, s.slice(0, a));
                }),
                (n.write = function(e, t, i) {
                    for (var n, r, s = i, a = 0; a < e.length; ++a)
                        (n = e.charCodeAt(a)) < 128
                            ? (t[i++] = n)
                            : n < 2048
                            ? ((t[i++] = (n >> 6) | 192),
                              (t[i++] = (63 & n) | 128))
                            : 55296 == (64512 & n) &&
                              56320 == (64512 & (r = e.charCodeAt(a + 1)))
                            ? ((n = 65536 + ((1023 & n) << 10) + (1023 & r)),
                              ++a,
                              (t[i++] = (n >> 18) | 240),
                              (t[i++] = ((n >> 12) & 63) | 128),
                              (t[i++] = ((n >> 6) & 63) | 128),
                              (t[i++] = (63 & n) | 128))
                            : ((t[i++] = (n >> 12) | 224),
                              (t[i++] = ((n >> 6) & 63) | 128),
                              (t[i++] = (63 & n) | 128));
                    return i - s;
                });
        },
        function(e, t, i) {
            "use strict";

            e.exports = function(e, t, i) {
                var n = i || 8192,
                    r = n >>> 1,
                    s = null,
                    a = n;
                return function(i) {
                    if (i < 1 || i > r) return e(i);
                    a + i > n && ((s = e(n)), (a = 0));
                    var o = t.call(s, a, (a += i));
                    return 7 & a && (a = 1 + (7 | a)), o;
                };
            };
        },
        function(e, t, i) {
            "use strict";

            e.exports = r;
            var n = i(7);
            function r(e, t) {
                (this.lo = e >>> 0), (this.hi = t >>> 0);
            }
            var s = (r.zero = new r(0, 0));
            (s.toNumber = function() {
                return 0;
            }),
                (s.zzEncode = s.zzDecode = function() {
                    return this;
                }),
                (s.length = function() {
                    return 1;
                });
            var a = (r.zeroHash = "\0\0\0\0\0\0\0\0");
            (r.fromNumber = function(e) {
                if (0 === e) return s;
                var t = e < 0;
                t && (e = -e);
                var i = e >>> 0,
                    n = ((e - i) / 4294967296) >>> 0;
                return (
                    t &&
                        ((n = ~n >>> 0),
                        (i = ~i >>> 0),
                        ++i > 4294967295 &&
                            ((i = 0), ++n > 4294967295 && (n = 0))),
                    new r(i, n)
                );
            }),
                (r.from = function(e) {
                    if ("number" == typeof e) return r.fromNumber(e);
                    if (n.isString(e)) {
                        if (!n.Long) return r.fromNumber(parseInt(e, 10));
                        e = n.Long.fromString(e);
                    }
                    return e.low || e.high
                        ? new r(e.low >>> 0, e.high >>> 0)
                        : s;
                }),
                (r.prototype.toNumber = function(e) {
                    if (!e && this.hi >>> 31) {
                        var t = (1 + ~this.lo) >>> 0,
                            i = ~this.hi >>> 0;
                        return t || (i = (i + 1) >>> 0), -(t + 4294967296 * i);
                    }
                    return this.lo + 4294967296 * this.hi;
                }),
                (r.prototype.toLong = function(e) {
                    return n.Long
                        ? new n.Long(0 | this.lo, 0 | this.hi, Boolean(e))
                        : {
                              low: 0 | this.lo,
                              high: 0 | this.hi,
                              unsigned: Boolean(e)
                          };
                });
            var o = String.prototype.charCodeAt;
            (r.fromHash = function(e) {
                return e === a
                    ? s
                    : new r(
                          (o.call(e, 0) |
                              (o.call(e, 1) << 8) |
                              (o.call(e, 2) << 16) |
                              (o.call(e, 3) << 24)) >>>
                              0,
                          (o.call(e, 4) |
                              (o.call(e, 5) << 8) |
                              (o.call(e, 6) << 16) |
                              (o.call(e, 7) << 24)) >>>
                              0
                      );
            }),
                (r.prototype.toHash = function() {
                    return String.fromCharCode(
                        255 & this.lo,
                        (this.lo >>> 8) & 255,
                        (this.lo >>> 16) & 255,
                        this.lo >>> 24,
                        255 & this.hi,
                        (this.hi >>> 8) & 255,
                        (this.hi >>> 16) & 255,
                        this.hi >>> 24
                    );
                }),
                (r.prototype.zzEncode = function() {
                    var e = this.hi >> 31;
                    return (
                        (this.hi =
                            (((this.hi << 1) | (this.lo >>> 31)) ^ e) >>> 0),
                        (this.lo = ((this.lo << 1) ^ e) >>> 0),
                        this
                    );
                }),
                (r.prototype.zzDecode = function() {
                    var e = -(1 & this.lo);
                    return (
                        (this.lo =
                            (((this.lo >>> 1) | (this.hi << 31)) ^ e) >>> 0),
                        (this.hi = ((this.hi >>> 1) ^ e) >>> 0),
                        this
                    );
                }),
                (r.prototype.length = function() {
                    var e = this.lo,
                        t = ((this.lo >>> 28) | (this.hi << 4)) >>> 0,
                        i = this.hi >>> 24;
                    return 0 === i
                        ? 0 === t
                            ? e < 16384
                                ? e < 128
                                    ? 1
                                    : 2
                                : e < 2097152
                                ? 3
                                : 4
                            : t < 16384
                            ? t < 128
                                ? 5
                                : 6
                            : t < 2097152
                            ? 7
                            : 8
                        : i < 128
                        ? 9
                        : 10;
                });
        },
        function(e, t, i) {
            "use strict";

            e.exports = s;
            var n = i(18);
            (s.prototype = Object.create(n.prototype)).constructor = s;
            var r = i(7);
            function s() {
                n.call(this);
            }
            function a(e, t, i) {
                e.length < 40
                    ? r.utf8.write(e, t, i)
                    : t.utf8Write
                    ? t.utf8Write(e, i)
                    : t.write(e, i);
            }
            (s._configure = function() {
                (s.alloc = r._Buffer_allocUnsafe),
                    (s.writeBytesBuffer =
                        r.Buffer &&
                        r.Buffer.prototype instanceof Uint8Array &&
                        "set" === r.Buffer.prototype.set.name
                            ? function(e, t, i) {
                                  t.set(e, i);
                              }
                            : function(e, t, i) {
                                  if (e.copy) e.copy(t, i, 0, e.length);
                                  else
                                      for (var n = 0; n < e.length; )
                                          t[i++] = e[n++];
                              });
            }),
                (s.prototype.bytes = function(e) {
                    r.isString(e) && (e = r._Buffer_from(e, "base64"));
                    var t = e.length >>> 0;
                    return (
                        this.uint32(t),
                        t && this._push(s.writeBytesBuffer, t, e),
                        this
                    );
                }),
                (s.prototype.string = function(e) {
                    var t = r.Buffer.byteLength(e);
                    return this.uint32(t), t && this._push(a, t, e), this;
                }),
                s._configure();
        },
        function(e, t, i) {
            "use strict";

            e.exports = s;
            var n = i(19);
            (s.prototype = Object.create(n.prototype)).constructor = s;
            var r = i(7);
            function s(e) {
                n.call(this, e);
            }
            (s._configure = function() {
                r.Buffer && (s.prototype._slice = r.Buffer.prototype.slice);
            }),
                (s.prototype.string = function() {
                    var e = this.uint32();
                    return this.buf.utf8Slice
                        ? this.buf.utf8Slice(
                              this.pos,
                              (this.pos = Math.min(this.pos + e, this.len))
                          )
                        : this.buf.toString(
                              "utf-8",
                              this.pos,
                              (this.pos = Math.min(this.pos + e, this.len))
                          );
                }),
                s._configure();
        },
        function(e, t, i) {
            "use strict";

            t.Service = i(50);
        },
        function(e, t, i) {
            "use strict";

            e.exports = r;
            var n = i(7);
            function r(e, t, i) {
                if ("function" != typeof e)
                    throw TypeError("rpcImpl must be a function");
                n.EventEmitter.call(this),
                    (this.rpcImpl = e),
                    (this.requestDelimited = Boolean(t)),
                    (this.responseDelimited = Boolean(i));
            }
            ((r.prototype = Object.create(
                n.EventEmitter.prototype
            )).constructor = r),
                (r.prototype.rpcCall = function e(t, i, r, s, a) {
                    if (!s) throw TypeError("request must be specified");
                    var o = this;
                    if (!a) return n.asPromise(e, o, t, i, r, s);
                    if (o.rpcImpl)
                        try {
                            return o.rpcImpl(
                                t,
                                i[
                                    o.requestDelimited
                                        ? "encodeDelimited"
                                        : "encode"
                                ](s).finish(),
                                function(e, i) {
                                    if (e) return o.emit("error", e, t), a(e);
                                    if (null !== i) {
                                        if (!(i instanceof r))
                                            try {
                                                i = r[
                                                    o.responseDelimited
                                                        ? "decodeDelimited"
                                                        : "decode"
                                                ](i);
                                            } catch (e) {
                                                return (
                                                    o.emit("error", e, t), a(e)
                                                );
                                            }
                                        return o.emit("data", i, t), a(null, i);
                                    }
                                    o.end(!0);
                                }
                            );
                        } catch (e) {
                            return (
                                o.emit("error", e, t),
                                void setTimeout(function() {
                                    a(e);
                                }, 0)
                            );
                        }
                    else
                        setTimeout(function() {
                            a(Error("already ended"));
                        }, 0);
                }),
                (r.prototype.end = function(e) {
                    return (
                        this.rpcImpl &&
                            (e || this.rpcImpl(null, null, null),
                            (this.rpcImpl = null),
                            this.emit("end").off()),
                        this
                    );
                });
        },
        function(e, t, i) {
            "use strict";

            e.exports = {};
        },
        function(e, t, i) {
            "use strict";

            i.r(t),
                i.d(t, "Client", function() {
                    return ye;
                }),
                i.d(t, "LOG", function() {
                    return d.default;
                }),
                i.d(t, "Log", function() {
                    return d.Log;
                }),
                i.d(t, "ChannelMediaRelayConfiguration", function() {
                    return k.ChannelMediaRelayConfiguration;
                }),
                i.d(t, "SDK_VERSION", function() {
                    return l.SDK_VERSION;
                });
            var n = i(2),
                r = i.n(n),
                s = i(3),
                a = i.n(s),
                o = i(5),
                l = i(4),
                u = i(13),
                c = i.n(u),
                p = i(8),
                h = i.n(p),
                d = i(0);
            var f = function(e) {
                    return (
                        (e = e || Object.create(null)),
                        {
                            on: function(t, i) {
                                (e[t] || (e[t] = [])).push(i);
                            },
                            off: function(t, i) {
                                e[t] && e[t].splice(e[t].indexOf(i) >>> 0, 1);
                            },
                            emit: function(t, i) {
                                (e[t] || []).slice().map(function(e) {
                                    e(i);
                                }),
                                    (e["*"] || []).slice().map(function(e) {
                                        e(t, i);
                                    });
                            }
                        }
                    );
                },
                y = i(21),
                g = i.n(y),
                v = i(12),
                w = i.n(v),
                m = (function() {
                    function e() {
                        r()(this, e),
                            (this.vid = T().vid),
                            (this.url =
                                "https://report-ad.agoralab.co/v1/report"),
                            (this.sdk_version = l.SDK_VERSION),
                            (this.onlineTimer = null);
                    }
                    return (
                        a()(e, [
                            {
                                key: "onlineUser",
                                value: function() {
                                    var e = this;
                                    this.onlineTimer = setInterval(function() {
                                        e.report("online_user");
                                    }, 2e4);
                                }
                            },
                            {
                                key: "destroy",
                                value: function() {
                                    null !== this.onlineTimer &&
                                        clearInterval(this.onlineTimer);
                                }
                            },
                            {
                                key: "report",
                                value: function(e) {
                                    var t =
                                            arguments.length > 1 &&
                                            void 0 !== arguments[1]
                                                ? arguments[1]
                                                : "",
                                        i =
                                            arguments.length > 2 &&
                                            void 0 !== arguments[2]
                                                ? arguments[2]
                                                : "",
                                        n =
                                            arguments.length > 3 &&
                                            void 0 !== arguments[3]
                                                ? arguments[3]
                                                : "",
                                        r = Date.now(),
                                        s = {
                                            pts: [
                                                {
                                                    m:
                                                        "online_user" === e
                                                            ? "online_user"
                                                            : "event",
                                                    ls: {
                                                        vid: this.vid,
                                                        version: this
                                                            .sdk_version
                                                    },
                                                    vs: {
                                                        count: 1
                                                    }
                                                }
                                            ],
                                            sign: w()(
                                                "src=miniapp&ts=".concat(r)
                                            ),
                                            src: "miniapp",
                                            ts: r
                                        };
                                    if ("online_user" !== e) {
                                        var a = {
                                            event: e,
                                            result: "success" === t ? "1" : "0",
                                            err_code: i.toString()
                                        };
                                        ("pusher_state_change" !== e &&
                                            "player_state_change" !== e) ||
                                            (void 0 !== n &&
                                                ("string" == typeof n
                                                    ? (a.message = n)
                                                    : ((a.wx_version =
                                                          n.version),
                                                      (a.user_mobile_model =
                                                          n.model),
                                                      (a.user_IP = n.ip),
                                                      (a.system = n.system)))),
                                            g()(s.pts[0].ls, a);
                                    }
                                    return this.request({
                                        body: s,
                                        url: this.url
                                    });
                                }
                            },
                            {
                                key: "request",
                                value: function(e) {
                                    return new Promise(function(t, i) {
                                        wx.request({
                                            url: e.url,
                                            data: e.body,
                                            header: {
                                                "content-type":
                                                    "application/json"
                                            },
                                            method: "POST",
                                            success: function(e) {
                                                d.default.debug(
                                                    "weixin request report success"
                                                ),
                                                    200 === e.statusCode
                                                        ? (d.default.debug(
                                                              "response success"
                                                          ),
                                                          t(e))
                                                        : d.default.debug(
                                                              "response fail: ".concat(
                                                                  e.statusCode
                                                              )
                                                          );
                                            },
                                            fail: function(e) {
                                                d.default.warn(
                                                    "weixin request report fail"
                                                ),
                                                    i(e);
                                            }
                                        });
                                    });
                                }
                            }
                        ]),
                        e
                    );
                })(),
                _ = (function() {
                    function e() {
                        r()(this, e), (this.ts = -1);
                    }
                    return (
                        a()(
                            e,
                            [
                                {
                                    key: "start",
                                    value: function() {
                                        return (
                                            (this.ts = new Date().getTime()),
                                            this
                                        );
                                    }
                                },
                                {
                                    key: "elapse",
                                    value: function() {
                                        if (-1 === this.ts)
                                            throw new Error(
                                                "timer not started"
                                            );
                                        return new Date().getTime() - this.ts;
                                    }
                                }
                            ],
                            [
                                {
                                    key: "create",
                                    value: function() {
                                        return new e();
                                    }
                                }
                            ]
                        ),
                        e
                    );
                })(),
                S = {};
            function T() {
                return S;
            }
            var E = [
                    "https://uap-ap-web-1.agora.io/api/v1",
                    "https://uap-ap-web-3.agora.io/api/v1",
                    "https://uap-ap-web-2.agoraio.cn/api/v1",
                    "https://uap-ap-web-4.agoraio.cn/api/v1"
                ],
                b = function(e) {
                    e.reportManager, e.grafanaReport;
                    var t = e.argusReport,
                        i = {
                            command: "convergeAllocateEdge",
                            sid: e.sid,
                            appId: e.appId,
                            token: e.appId,
                            uid: e.uid + "",
                            cname: e.channel,
                            ts: Math.floor(Date.now() / 1e3),
                            version: l.VERSION,
                            seq: 0,
                            requestId: 1
                        };
                    return new Promise(function(n, r) {
                        var s = 0,
                            a = _.create().start(),
                            o = function(i, n) {
                                t.reportJoinCS(
                                    e.channel,
                                    e.uid,
                                    !1,
                                    a.elapse(),
                                    JSON.stringify(i),
                                    n,
                                    null
                                ),
                                    4 === ++s && r(i);
                            },
                            l = function(r) {
                                var s = E[r];
                                wx.request({
                                    url: s,
                                    data: {
                                        service_name: "miniapp",
                                        json_body: JSON.stringify(i)
                                    },
                                    header: {
                                        "content-type": "application/json",
                                        "X-Packet-URI": 61,
                                        "X-Packet-Service-Type": 0
                                    },
                                    method: "POST",
                                    success: function(i) {
                                        var r,
                                            l,
                                            u = i.data;
                                        if (
                                            (d.default.debug(
                                                "From choose server",
                                                i
                                            ),
                                            i.profile)
                                        ) {
                                            var c = i.profile.peerIP;
                                            (r = c), (S.ip = r);
                                        } else
                                            d.default.debug(
                                                "skip user IP report!"
                                            );
                                        if (200 !== i.statusCode)
                                            o(
                                                {
                                                    code: 901,
                                                    reason:
                                                        u.error ||
                                                        "choose server fail"
                                                },
                                                s
                                            );
                                        else {
                                            var p = JSON.parse(u.json_body),
                                                h = p.vid;
                                            (l = h), (S.vid = l);
                                            var f = (function(e) {
                                                if (void 0 !== e)
                                                    return e.map(function(e) {
                                                        var t = e.address.split(
                                                                "."
                                                            ),
                                                            i = t.length;
                                                        return "wss://miniapp.agoraio.cn/"
                                                            .concat(
                                                                t[i - 4],
                                                                "-"
                                                            )
                                                            .concat(
                                                                t[i - 3],
                                                                "-"
                                                            )
                                                            .concat(
                                                                t[i - 2],
                                                                "-"
                                                            )
                                                            .concat(
                                                                t[i - 1],
                                                                "/api"
                                                            );
                                                    });
                                                d.default.error(
                                                    "miniapp service is not enabled for this AppID"
                                                );
                                            })(p.servers);
                                            t.reportJoinCS(
                                                e.channel,
                                                e.uid,
                                                !0,
                                                a.elapse(),
                                                null,
                                                s,
                                                f.join(",")
                                            ),
                                                n({
                                                    serverlist: f,
                                                    url: s
                                                });
                                        }
                                    },
                                    fail: function(e) {
                                        o(
                                            {
                                                code: 901,
                                                reason:
                                                    e.errMsg ||
                                                    "choose server fail"
                                            },
                                            s
                                        );
                                    }
                                });
                            };
                        E.map(function(e, t) {
                            l(t);
                        });
                    });
                },
                O = (function() {
                    function e(t, i) {
                        r()(this, e),
                            (this.serverlist = []),
                            (this.option = t),
                            (this.index = 0),
                            (this.isInit = !0),
                            (this.state = "disconnected"),
                            (this.hasInvokeClose = !1),
                            (this.emitter = i),
                            (this.on = this.emitter.on),
                            (this.off = this.emitter.off),
                            (this.emit = this.emitter.emit);
                    }
                    return (
                        a()(e, [
                            {
                                key: "connect",
                                value: function() {
                                    var e = this;
                                    "disconnected" !== this.state &&
                                        this.close(),
                                        b(this.option)
                                            .then(function(t) {
                                                var i = t.serverlist,
                                                    n = t.url;
                                                d.default.debug(
                                                    "Get server list from " + n
                                                ),
                                                    (e.index = 0),
                                                    (e.serverlist = i),
                                                    e.option &&
                                                        e.option.servers &&
                                                        (e.serverlist =
                                                            e.option.servers),
                                                    d.default.debug(
                                                        "Connect server with list: ",
                                                        e.serverlist
                                                    ),
                                                    e.connectWorker(
                                                        e.serverlist[e.index]
                                                    );
                                            })
                                            .catch(function(t) {
                                                e.emit &&
                                                    e.emit("socketError", t);
                                            });
                                }
                            },
                            {
                                key: "connectWorker",
                                value: function() {
                                    var e = this;
                                    this.state = "connecting";
                                    var t = this.serverlist[this.index];
                                    d.default.debug("Connect server: ", t);
                                    var i = this.option,
                                        n = (i.sid, i.channel),
                                        r = i.uid,
                                        s = i.argusReport,
                                        a = _.create().start();
                                    (this.ws = wx.connectSocket({
                                        url: t,
                                        complete: function(e) {
                                            return d.default.debug(
                                                "wxSocket: complete: ",
                                                e
                                            );
                                        },
                                        fail: function(e) {
                                            d.default.debug(
                                                "wxSocket: fail: ",
                                                e
                                            ),
                                                s &&
                                                    s.reportConnectWS(
                                                        n,
                                                        r,
                                                        !1,
                                                        a.elapse(),
                                                        JSON.stringify(e),
                                                        null,
                                                        t
                                                    );
                                        },
                                        success: function(e) {
                                            d.default.debug(
                                                "wxSocket success: ",
                                                e
                                            ),
                                                s &&
                                                    s.reportConnectWS(
                                                        n,
                                                        r,
                                                        !0,
                                                        a.elapse(),
                                                        null,
                                                        null,
                                                        t
                                                    );
                                        }
                                    })),
                                        this.ws.onOpen(this._onopen.bind(this)),
                                        this.ws.onMessage(
                                            this._onmessage.bind(this)
                                        ),
                                        this.ws.onError(function(e) {
                                            d.default.error(
                                                "websocket onerror: " +
                                                    JSON.stringify(e)
                                            ),
                                                s &&
                                                    s.reportConnectWS(
                                                        n,
                                                        r,
                                                        !1,
                                                        a.elapse(),
                                                        JSON.stringify(e),
                                                        null,
                                                        t
                                                    );
                                        }),
                                        (this.establishWSTimeoutTimer = setTimeout(
                                            function() {
                                                "connected" !== e.state &&
                                                    e.connectNextWorker();
                                            },
                                            5e3
                                        ));
                                }
                            },
                            {
                                key: "connectNextWorker",
                                value: function() {
                                    var e = this;
                                    this.close().then(function(t) {
                                        d.default.debug(
                                            e.index,
                                            e.serverlist.length
                                        ),
                                            e.index >= e.serverlist.length - 1
                                                ? e.emit &&
                                                  e.emit("socketError", {
                                                      code: 905,
                                                      reason:
                                                          "connect websocket failed",
                                                      wsurl: JSON.stringify(
                                                          e.serverlist
                                                      )
                                                  })
                                                : (e.index++,
                                                  e.connectWorker());
                                    });
                                }
                            },
                            {
                                key: "_onopen",
                                value: function() {
                                    d.default.info("websocket onopen"),
                                        clearTimeout(
                                            this.establishWSTimeoutTimer
                                        ),
                                        (this.state = "connected"),
                                        (this.isInit = !1),
                                        this.hasInvokeClose
                                            ? d.default.debug(
                                                  "Alread invoke ws.Close, will not throw onopen event"
                                              )
                                            : (this.ws.onClose(
                                                  this._onclose.bind(this)
                                              ),
                                              this.emit && this.emit("onopen"));
                                }
                            },
                            {
                                key: "_onclose",
                                value: function(e) {
                                    d.default.info(
                                        "websocket onclose:" + JSON.stringify(e)
                                    ),
                                        this.emitter.emit("_wsClose"),
                                        clearTimeout(
                                            this.establishWSTimeoutTimer
                                        ),
                                        (this.state = "disconnected"),
                                        (e && "close" == e.reason) ||
                                            this.hasInvokeClose ||
                                            (this.isInit
                                                ? this.connectNextWorker()
                                                : this.emit &&
                                                  this.emit("onclose"));
                                }
                            },
                            {
                                key: "_onmessage",
                                value: function(e) {
                                    this.hasInvokeClose ||
                                        (d.default.blind(
                                            "receive message: ",
                                            JSON.stringify(e)
                                        ),
                                        this.isConnected() &&
                                            this.emit &&
                                            this.emit("onmessage", e));
                                }
                            },
                            {
                                key: "isConnected",
                                value: function() {
                                    return "connected" === this.state;
                                }
                            },
                            {
                                key: "sendMessage",
                                value: function(e) {
                                    d.default.blind("send message: ", e),
                                        this.isConnected() &&
                                            this.ws &&
                                            this.ws.send({
                                                data: e
                                            });
                                }
                            },
                            {
                                key: "_checkServerList",
                                value: function(e) {
                                    return (
                                        e instanceof Array != 0 && 0 != e.length
                                    );
                                }
                            },
                            {
                                key: "destroy",
                                value: function(e) {
                                    var t = this;
                                    "disconnected" !== this.state &&
                                        this.close();
                                    this.on("_wsClose", function i() {
                                        t.off("_wsClose", i),
                                            (t.serverlist = null),
                                            (t.ws = null),
                                            (t.emitter = null),
                                            (t.on = null),
                                            (t.off = null),
                                            (t.emit = null),
                                            e && e();
                                    });
                                }
                            },
                            {
                                key: "close",
                                value: function() {
                                    var e = this;
                                    return new Promise(function(t, i) {
                                        return "disconnected" == e.state
                                            ? t()
                                            : (clearTimeout(
                                                  e.establishWSTimeoutTimer
                                              ),
                                              (e.hasInvokeClose = !0),
                                              (e.state = "disconnected"),
                                              e.ws
                                                  ? (e.ws.close({
                                                        reason: "close",
                                                        success: function() {
                                                            d.default.debug(
                                                                "Close websocket success"
                                                            ),
                                                                t();
                                                        },
                                                        fail: function(t) {
                                                            d.default.debug(
                                                                "Close websocket fail ",
                                                                t
                                                            );
                                                            var n = e.option,
                                                                r =
                                                                    (n.sid,
                                                                    n.channel),
                                                                s = n.uid,
                                                                a =
                                                                    n.argusReport,
                                                                o =
                                                                    e
                                                                        .serverlist[
                                                                        e.index
                                                                    ];
                                                            a &&
                                                                a.reportConnectWS(
                                                                    r,
                                                                    s,
                                                                    !1,
                                                                    0,
                                                                    JSON.stringify(
                                                                        t
                                                                    ),
                                                                    null,
                                                                    o
                                                                ),
                                                                i();
                                                        }
                                                    }),
                                                    void (e.ws = null))
                                                  : t());
                                    });
                                }
                            }
                        ]),
                        e
                    );
                })(),
                R = (function() {
                    function e(t) {
                        r()(this, e),
                            (this.appId = t.appId),
                            (this.channel = t.channel),
                            (this.uid = t.uid + ""),
                            (this.sid = t.sid),
                            (this.seq = 1),
                            (this.requestId = 2);
                    }
                    return (
                        a()(e, [
                            {
                                key: "setSid",
                                value: function(e) {
                                    this.sid = e;
                                }
                            },
                            {
                                key: "_getWorkerManagerMsg",
                                value: function() {
                                    return {
                                        appId: this.appId,
                                        cname: this.channel,
                                        uid: this.uid,
                                        sid: this.sid,
                                        sdkVersion: l.VERSION,
                                        seq: ++this.seq,
                                        requestId: ++this.requestId,
                                        ts: Math.floor(Date.now() / 1e3)
                                    };
                                }
                            },
                            {
                                key: "send",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (t.clientRequest = e), t;
                                }
                            },
                            {
                                key: "updatePushUrl",
                                value: function() {
                                    var e = this._getWorkerManagerMsg();
                                    return (
                                        (e.clientRequest = {
                                            action: "update_url",
                                            role: "publish",
                                            uid: +this.uid
                                        }),
                                        e
                                    );
                                }
                            },
                            {
                                key: "ping",
                                value: function() {
                                    return {
                                        command: "ping",
                                        requestId: ++this.requestId,
                                        appId: this.appId,
                                        cname: this.channel,
                                        uid: this.uid + "",
                                        sid: this.sid,
                                        ts: Math.floor(Date.now() / 1e3)
                                    };
                                }
                            },
                            {
                                key: "ping2",
                                value: function() {
                                    var e = this._getWorkerManagerMsg();
                                    return (
                                        (e.clientRequest = {
                                            action: "ping"
                                        }),
                                        e
                                    );
                                }
                            },
                            {
                                key: "setRole",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (
                                        (t.clientRequest = {
                                            action: "set_role",
                                            role: e
                                        }),
                                        t
                                    );
                                }
                            },
                            {
                                key: "rejoin",
                                value: function(e, t, i, n, r, s, a, o, l) {
                                    var u = this._getWorkerManagerMsg();
                                    return (
                                        (u.clientRequest = {
                                            action: "join",
                                            role: s,
                                            appId: e,
                                            customAudioCodec: o,
                                            key_vocs: n || e,
                                            key_vos: n || e,
                                            channel_name: t,
                                            uid: i + "",
                                            known_speakers: r,
                                            clientType:
                                                "undefined" == typeof qq
                                                    ? "wechat"
                                                    : "qq",
                                            audio_only: a,
                                            uidType: l
                                        }),
                                        u
                                    );
                                }
                            },
                            {
                                key: "join",
                                value: function(e, t, i, n, r, s, a, o, u, c) {
                                    var p = this._getWorkerManagerMsg();
                                    return (
                                        (p.clientRequest = {
                                            action: "join",
                                            role: r,
                                            appId: e,
                                            customAudioCodec: u,
                                            key_vocs: n || e,
                                            key_vos: n || e,
                                            channel_name: t,
                                            uid: i + "",
                                            vid: T().vid.toString(),
                                            device: s,
                                            os: a,
                                            version: l.SDK_VERSION,
                                            clientType:
                                                "undefined" == typeof qq
                                                    ? "wechat"
                                                    : "qq",
                                            audio_only: o,
                                            uidType: c
                                        }),
                                        p
                                    );
                                }
                            },
                            {
                                key: "muteLocal",
                                value: function(e, t) {
                                    var i = this._getWorkerManagerMsg();
                                    return (
                                        (i.clientRequest = {
                                            action: "mute_local",
                                            uid: +e,
                                            target: t,
                                            mute: !0
                                        }),
                                        i
                                    );
                                }
                            },
                            {
                                key: "unmuteLocal",
                                value: function(e, t) {
                                    var i = this._getWorkerManagerMsg();
                                    return (
                                        (i.clientRequest = {
                                            action: "mute_local",
                                            uid: +e,
                                            target: t,
                                            mute: !1
                                        }),
                                        i
                                    );
                                }
                            },
                            {
                                key: "mute",
                                value: function(e, t) {
                                    var i = this._getWorkerManagerMsg();
                                    return (
                                        (i.clientRequest = {
                                            action: "mute",
                                            uid: +e,
                                            target: t
                                        }),
                                        i
                                    );
                                }
                            },
                            {
                                key: "unmute",
                                value: function(e, t) {
                                    var i = this._getWorkerManagerMsg();
                                    return (
                                        (i.clientRequest = {
                                            action: "unmute",
                                            uid: +e,
                                            target: t
                                        }),
                                        i
                                    );
                                }
                            },
                            {
                                key: "publish",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (
                                        (t.clientRequest = {
                                            action: "publish",
                                            uid: +e
                                        }),
                                        t
                                    );
                                }
                            },
                            {
                                key: "unpublish",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (
                                        (t.clientRequest = {
                                            action: "unpublish",
                                            uid: +e
                                        }),
                                        t
                                    );
                                }
                            },
                            {
                                key: "subscribe",
                                value: function(e, t) {
                                    var i = this._getWorkerManagerMsg();
                                    return (
                                        (i.clientRequest = {
                                            action: "subscribe",
                                            uid: +e,
                                            options: {
                                                audio: t.audio,
                                                video: t.video
                                            }
                                        }),
                                        i
                                    );
                                }
                            },
                            {
                                key: "unsubscribe",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (
                                        (t.clientRequest = {
                                            action: "unsubscribe",
                                            uid: [+e]
                                        }),
                                        t
                                    );
                                }
                            },
                            {
                                key: "setRemoteVideoStreamType",
                                value: function(e, t) {
                                    var i = this._getWorkerManagerMsg();
                                    return (
                                        (i.clientRequest = {
                                            action: "set_remote_stream_type",
                                            uid: +e,
                                            type: t
                                        }),
                                        i
                                    );
                                }
                            },
                            {
                                key: "renewToken",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (
                                        (t.clientRequest = {
                                            action: "update_key",
                                            key_vos: e
                                        }),
                                        t
                                    );
                                }
                            },
                            {
                                key: "leave",
                                value: function(e) {
                                    var t = this._getWorkerManagerMsg();
                                    return (
                                        (t.clientRequest = {
                                            action: "leave",
                                            uid: +e
                                        }),
                                        t
                                    );
                                }
                            }
                        ]),
                        e
                    );
                })(),
                k = i(1),
                I = i.n(k),
                P = (function() {
                    function e(t, i) {
                        r()(this, e),
                            (this.appId = t.appId),
                            (this.channel = t.channel),
                            (this.uid = t.uid),
                            (this.sid = t.sid),
                            (this.role = t.role),
                            (this.channelKey = t.channelKey),
                            (this.clientId = "client"),
                            (this.option = t),
                            (this.timers = new Set()),
                            (this.reportManager = t.reportManager),
                            (this.grafanaReport = t.grafanaReport),
                            (this.argusReport = t.argusReport),
                            (this.audioCodec = t.audioCodec),
                            (this.uidType = t.uidType),
                            (this.clientEmitter = i),
                            (this.emitter = new f()),
                            (this.on = this.emitter.on),
                            (this.off = this.emitter.off),
                            (this.emit = this.emitter.emit),
                            (this.join = this.join.bind(this)),
                            (this.msgManager = new R(t));
                    }
                    var t, i, n;
                    return (
                        a()(e, [
                            {
                                key: "connect",
                                value: function() {
                                    var e = this;
                                    return new Promise(function(t, i) {
                                        (e.ws = new O(e.option, e.emitter)),
                                            e.ws.connect(),
                                            e.on(
                                                "onmessage",
                                                e._onMessage.bind(e)
                                            );
                                        e.on("socketError", function() {
                                            i();
                                        }),
                                            e.on("onopen", function i() {
                                                e.off && e.off("onopen", i),
                                                    e._ping(),
                                                    t();
                                            }),
                                            e.on("onclose", function() {
                                                return e.clientEmitter.emit(
                                                    "error",
                                                    {
                                                        code: 904,
                                                        reason:
                                                            "websocket disconnected"
                                                    }
                                                );
                                            });
                                    });
                                }
                            },
                            {
                                key: "_onMessage",
                                value: function(e) {
                                    if (e && e.data) {
                                        var t = JSON.parse(e.data);
                                        if (
                                            (t &&
                                                "pong" !== t.command &&
                                                (d.default.debug(
                                                    "worker message: ",
                                                    t
                                                ),
                                                d.default.debug(
                                                    "code message:",
                                                    t
                                                ),
                                                this.argusReport.reportServerEvent(
                                                    this.channel,
                                                    this.uid,
                                                    !0,
                                                    0,
                                                    "serverEvent",
                                                    t
                                                )),
                                            t.requestId &&
                                                this.emit(t.requestId, t),
                                            "serverStatus" === t.command)
                                        ) {
                                            if (t.code && 200 !== t.code) {
                                                if (503 === t.code) return;
                                                this.clientEmitter.emit(
                                                    "error",
                                                    {
                                                        code: t.code,
                                                        reason:
                                                            t.reason ||
                                                            "server error"
                                                    }
                                                );
                                            }
                                            if (t.serverStatus) {
                                                d.default.info(
                                                    "Receive message from server: ".concat(
                                                        JSON.stringify(
                                                            t.serverStatus
                                                        )
                                                    )
                                                );
                                                var i = t.serverStatus.action;
                                                if ("audio-mute" == i)
                                                    return t.serverStatus.mute
                                                        ? this.clientEmitter.emit(
                                                              "mute-audio",
                                                              {
                                                                  uid:
                                                                      t
                                                                          .serverStatus
                                                                          .uid
                                                              }
                                                          )
                                                        : this.clientEmitter.emit(
                                                              "unmute-audio",
                                                              {
                                                                  uid:
                                                                      t
                                                                          .serverStatus
                                                                          .uid
                                                              }
                                                          );
                                                if ("video-mute" == i)
                                                    return t.serverStatus.mute
                                                        ? this.clientEmitter.emit(
                                                              "mute-video",
                                                              {
                                                                  uid:
                                                                      t
                                                                          .serverStatus
                                                                          .uid
                                                              }
                                                          )
                                                        : this.clientEmitter.emit(
                                                              "unmute-video",
                                                              {
                                                                  uid:
                                                                      t
                                                                          .serverStatus
                                                                          .uid
                                                              }
                                                          );
                                                if ("key-expired" === i)
                                                    return this.clientEmitter.emit(
                                                        "token-privilege-did-expire"
                                                    );
                                                if ("key-will-expire" === i)
                                                    return this.clientEmitter.emit(
                                                        "token-privilege-will-expire"
                                                    );
                                                if (
                                                    "client-is-banned-by-server" ===
                                                    i
                                                )
                                                    return this.clientEmitter.emit(
                                                        "client-banned"
                                                    );
                                                this.clientEmitter.emit(
                                                    i,
                                                    t.serverStatus
                                                );
                                            }
                                        }
                                    }
                                }
                            },
                            {
                                key: "_sendMessage",
                                value: function(e) {
                                    var t = this;
                                    if (this.ws)
                                        return new Promise(function(i, n) {
                                            if (!t.isWSConnected())
                                                return n({
                                                    code: 904,
                                                    reason:
                                                        "websocket disconnected",
                                                    wsurl: t.getWSUrl()
                                                });
                                            "ping" !== e.command &&
                                                d.default.debug(
                                                    "send to woker: ",
                                                    e
                                                );
                                            var r,
                                                s = e ? e.requestId : null,
                                                a = function e(a) {
                                                    if (t.ws)
                                                        return (
                                                            t.off(s, e),
                                                            clearTimeout(r),
                                                            t.timers.delete(r),
                                                            200 == a.code
                                                                ? i(
                                                                      a.serverResponse
                                                                  )
                                                                : n({
                                                                      code:
                                                                          a.code,
                                                                      reason:
                                                                          a.msg ||
                                                                          a.reason,
                                                                      serverResponse:
                                                                          a.serverResponse,
                                                                      wsurl: t.getWSUrl()
                                                                  })
                                                        );
                                                };
                                            if (!s)
                                                return n({
                                                    code: 902,
                                                    reason: "no requestid"
                                                });
                                            t.ws.sendMessage(JSON.stringify(e)),
                                                t.on(s, a),
                                                (r = setTimeout(function() {
                                                    return a({
                                                        code: 903,
                                                        reason: "time out"
                                                    });
                                                }, 1e4)),
                                                t.timers.add(r);
                                        });
                                }
                            },
                            {
                                key: "_ping",
                                value: function() {
                                    var e = this;
                                    this.pingTimer = setInterval(function() {
                                        e.ws.sendMessage(
                                            JSON.stringify(e.msgManager.ping())
                                        );
                                    }, 3e3);
                                }
                            },
                            {
                                key: "setRole",
                                value: function(e) {
                                    return this._sendMessage(
                                        this.msgManager.setRole(e)
                                    );
                                }
                            },
                            {
                                key: "rejoin",
                                value: function(e, t) {
                                    return this._sendMessage(
                                        this.msgManager.rejoin(
                                            this.appId,
                                            this.channel,
                                            this.uid,
                                            this.channelKey,
                                            e,
                                            this.role,
                                            t,
                                            this.audioCodec,
                                            this.uidType
                                        )
                                    );
                                }
                            },
                            {
                                key: "join",
                                value: function(e, t, i) {
                                    return this._sendMessage(
                                        this.msgManager.join(
                                            this.appId,
                                            this.channel,
                                            this.uid,
                                            this.channelKey,
                                            this.role,
                                            e,
                                            t,
                                            i,
                                            this.audioCodec,
                                            this.uidType
                                        )
                                    );
                                }
                            },
                            {
                                key: "send",
                                value: function(e) {
                                    return this._sendMessage(
                                        this.msgManager.send(e)
                                    );
                                }
                            },
                            {
                                key: "updatePushUrl",
                                value: function() {
                                    return this._sendMessage(
                                        this.msgManager.updatePushUrl()
                                    );
                                }
                            },
                            {
                                key: "publish",
                                value: function() {
                                    return this._sendMessage(
                                        this.msgManager.publish(this.uid)
                                    );
                                }
                            },
                            {
                                key: "unpublish",
                                value: function() {
                                    return this._sendMessage(
                                        this.msgManager.unpublish(this.uid)
                                    );
                                }
                            },
                            {
                                key: "subscribe",
                                value: function(e, t) {
                                    return this._sendMessage(
                                        this.msgManager.subscribe(e, t)
                                    );
                                }
                            },
                            {
                                key: "unsubscribe",
                                value: function(e) {
                                    return this._sendMessage(
                                        this.msgManager.unsubscribe(e)
                                    );
                                }
                            },
                            {
                                key: "setRemoteVideoStreamType",
                                value: function(e, t) {
                                    return this._sendMessage(
                                        this.msgManager.setRemoteVideoStreamType(
                                            e,
                                            t
                                        )
                                    );
                                }
                            },
                            {
                                key: "mute",
                                value: function(e, t) {
                                    return this._sendMessage(
                                        this.msgManager.mute(e, t)
                                    );
                                }
                            },
                            {
                                key: "unmute",
                                value: function(e, t) {
                                    return this._sendMessage(
                                        this.msgManager.unmute(e, t)
                                    );
                                }
                            },
                            {
                                key: "muteLocal",
                                value: function(e) {
                                    return this._sendMessage(
                                        this.msgManager.muteLocal(this.uid, e)
                                    );
                                }
                            },
                            {
                                key: "unmuteLocal",
                                value: function(e) {
                                    return this._sendMessage(
                                        this.msgManager.unmuteLocal(this.uid, e)
                                    );
                                }
                            },
                            {
                                key: "renewToken",
                                value: function(e) {
                                    return this._sendMessage(
                                        this.msgManager.renewToken(e)
                                    );
                                }
                            },
                            {
                                key: "leave",
                                value: function() {
                                    return this._sendMessage(
                                        this.msgManager.leave(this.uid)
                                    );
                                }
                            },
                            {
                                key: "isWSConnected",
                                value: function() {
                                    return !!this.ws && this.ws.isConnected();
                                }
                            },
                            {
                                key: "getWSUrl",
                                value: function() {
                                    return this.ws.serverlist[this.ws.index];
                                }
                            },
                            {
                                key: "destroy",
                                value: function(e) {
                                    var t = this;
                                    clearInterval(this.pingTimer),
                                        this.timers.forEach(function(e) {
                                            clearInterval(e);
                                        }),
                                        (this.timers = null),
                                        this.ws &&
                                            this.ws.destroy(function() {
                                                (t.ws = null),
                                                    (t.emitter = null),
                                                    (t.on = null),
                                                    (t.off = null),
                                                    (t.emit = null),
                                                    e && e();
                                            });
                                }
                            },
                            {
                                key: "startChannelMediaRelay",
                                value:
                                    ((n = c()(
                                        h.a.mark(function e(t) {
                                            var i,
                                                n,
                                                r,
                                                s,
                                                a,
                                                o = this;
                                            return h.a.wrap(
                                                function(e) {
                                                    for (;;)
                                                        switch (
                                                            (e.prev = e.next)
                                                        ) {
                                                            case 0:
                                                                if (
                                                                    !this
                                                                        .channelMediaRelayController
                                                                ) {
                                                                    e.next = 2;
                                                                    break;
                                                                }
                                                                throw new k.ChannelMediaError(
                                                                    "RELAY_ALREADY_START",
                                                                    "",
                                                                    k.CHANNEL_MEDIA_RELAY_ERROR.RELAY_ALREADY_START
                                                                );
                                                            case 2:
                                                                return (
                                                                    (i = function(
                                                                        e
                                                                    ) {
                                                                        o.clientEmitter.emit(
                                                                            {
                                                                                type:
                                                                                    "channel-media-relay-event",
                                                                                code: e
                                                                            }
                                                                        );
                                                                    }),
                                                                    (n = function(
                                                                        e,
                                                                        t,
                                                                        i
                                                                    ) {
                                                                        e ===
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_STATE
                                                                                .RELAY_STATE_FAILURE &&
                                                                            t ===
                                                                                k
                                                                                    .CHANNEL_MEDIA_RELAY_ERROR
                                                                                    .SERVER_CONNECTION_LOST &&
                                                                            (o.channelMediaRelayController.dispose(),
                                                                            (o.channelMediaRelayController = null)),
                                                                            o.clientEmitter.emit(
                                                                                {
                                                                                    type:
                                                                                        "channel-media-relay-state",
                                                                                    state: e,
                                                                                    code: t,
                                                                                    data: i
                                                                                }
                                                                            );
                                                                    }),
                                                                    (r = {
                                                                        token: this
                                                                            .appId,
                                                                        appId: this
                                                                            .appId,
                                                                        cname: this
                                                                            .channel,
                                                                        uid: this
                                                                            .uid,
                                                                        sid: this
                                                                            .sid,
                                                                        clientId: this
                                                                            .clientId
                                                                    }),
                                                                    (this.channelMediaRelayController = new I.a(
                                                                        r,
                                                                        this.clientId
                                                                    )),
                                                                    this.channelMediaRelayController.on(
                                                                        "event",
                                                                        i
                                                                    ),
                                                                    this.channelMediaRelayController.on(
                                                                        "state",
                                                                        n
                                                                    ),
                                                                    (e.prev = 8),
                                                                    (e.next = 11),
                                                                    this.channelMediaRelayController.startChannelMediaRelay(
                                                                        t
                                                                    )
                                                                );
                                                            case 11:
                                                                e.next = 23;
                                                                break;
                                                            case 13:
                                                                throw ((e.prev = 13),
                                                                (e.t0 = e.catch(
                                                                    8
                                                                )),
                                                                d.default.debug(
                                                                    "["
                                                                        .concat(
                                                                            this
                                                                                .clientId,
                                                                            "] startChannelMediaRelay exception: "
                                                                        )
                                                                        .concat(
                                                                            JSON.stringify(
                                                                                e.t0
                                                                            )
                                                                        )
                                                                ),
                                                                (s =
                                                                    k
                                                                        .CHANNEL_MEDIA_RELAY_STATE
                                                                        .RELAY_STATE_FAILURE),
                                                                (a = ""),
                                                                (a =
                                                                    e.t0 instanceof
                                                                    k.ChannelMediaError
                                                                        ? "SetSourceChannelStatus" ===
                                                                              e
                                                                                  .t0
                                                                                  .data ||
                                                                          (e.t0
                                                                              .data &&
                                                                              e
                                                                                  .t0
                                                                                  .data
                                                                                  .serverResponse &&
                                                                              "SetSourceChannel" ===
                                                                                  e
                                                                                      .t0
                                                                                      .data
                                                                                      .serverResponse
                                                                                      .command)
                                                                            ? "FAILED_JOIN_SRC"
                                                                            : "SetDestChannelStatus" ===
                                                                                  e
                                                                                      .t0
                                                                                      .data ||
                                                                              (e
                                                                                  .t0
                                                                                  .data &&
                                                                                  e
                                                                                      .t0
                                                                                      .data
                                                                                      .serverResponse &&
                                                                                  "SetDestChannel" ===
                                                                                      e
                                                                                          .t0
                                                                                          .data
                                                                                          .serverResponse
                                                                                          .command)
                                                                            ? "FAILED_JOIN_DEST"
                                                                            : e
                                                                                  .t0
                                                                                  .data &&
                                                                              e
                                                                                  .t0
                                                                                  .data
                                                                                  .serverResponse &&
                                                                              "StartPacketTransfer" ===
                                                                                  e
                                                                                      .t0
                                                                                      .data
                                                                                      .serverResponse
                                                                                      .command
                                                                            ? "FAILED_PACKET_SENT_TO_DEST"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .REQUEST_TIMEOUT ||
                                                                              e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .WAIT_STATUS_TIMEOUT
                                                                            ? "SERVER_NO_RESPONSE"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .REQUEST_FAILED ||
                                                                              e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .WAIT_STATUS_ERROR
                                                                            ? "SERVER_ERROR_RESPONSE"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                              k
                                                                                  .CHANNEL_MEDIA_ERROR
                                                                                  .AP_REQUEST_TIMEOUT
                                                                            ? "NO_RESOURCE_AVAILABLE"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .WS_ABORT ||
                                                                              e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .AP_REQUEST_ABORT
                                                                            ? "OPERATION_ABORT"
                                                                            : "INTERNAL_ERROR"
                                                                        : "INTERNAL_ERROR"),
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-state",
                                                                        state: s,
                                                                        code:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_ERROR[
                                                                                a
                                                                            ]
                                                                    }
                                                                ),
                                                                this
                                                                    .channelMediaRelayController &&
                                                                    (this.channelMediaRelayController.dispose(),
                                                                    (this.channelMediaConfig = null),
                                                                    (this.channelMediaRelayController = null)),
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-state",
                                                                        state:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_STATE
                                                                                .RELAY_STATE_IDLE
                                                                    }
                                                                ),
                                                                new k.ChannelMediaError(
                                                                    a,
                                                                    null,
                                                                    k.CHANNEL_MEDIA_RELAY_ERROR[
                                                                        a
                                                                    ]
                                                                ));
                                                            case 23:
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-state",
                                                                        state:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_STATE
                                                                                .RELAY_STATE_RUNNING,
                                                                        code:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_ERROR
                                                                                .RELAY_OK
                                                                    }
                                                                ),
                                                                    (this.channelMediaConfig = t);
                                                            case 25:
                                                            case "end":
                                                                return e.stop();
                                                        }
                                                },
                                                e,
                                                this,
                                                [[8, 13]]
                                            );
                                        })
                                    )),
                                    function(e) {
                                        return n.apply(this, arguments);
                                    })
                            },
                            {
                                key: "updateChannelMediaRelay",
                                value:
                                    ((i = c()(
                                        h.a.mark(function e(t) {
                                            var i, n;
                                            return h.a.wrap(
                                                function(e) {
                                                    for (;;)
                                                        switch (
                                                            (e.prev = e.next)
                                                        ) {
                                                            case 0:
                                                                if (
                                                                    this
                                                                        .channelMediaRelayController
                                                                ) {
                                                                    e.next = 2;
                                                                    break;
                                                                }
                                                                throw new k.ChannelMediaError(
                                                                    "RELAY_NOT_START",
                                                                    null,
                                                                    k.CHANNEL_MEDIA_RELAY_ERROR.RELAY_NOT_START
                                                                );
                                                            case 2:
                                                                return (
                                                                    (e.prev = 2),
                                                                    (e.next = 5),
                                                                    this.channelMediaRelayController.updateChannelMediaRelay(
                                                                        t
                                                                    )
                                                                );
                                                            case 5:
                                                                e.next = 18;
                                                                break;
                                                            case 7:
                                                                throw ((e.prev = 7),
                                                                (e.t0 = e.catch(
                                                                    2
                                                                )),
                                                                d.default.debug(
                                                                    "["
                                                                        .concat(
                                                                            this
                                                                                .clientId,
                                                                            "] updateChannelMediaRelay exception: "
                                                                        )
                                                                        .concat(
                                                                            JSON.stringify(
                                                                                e.t0
                                                                            )
                                                                        )
                                                                ),
                                                                (i =
                                                                    k
                                                                        .CHANNEL_MEDIA_RELAY_STATE
                                                                        .RELAY_STATE_FAILURE),
                                                                (n = ""),
                                                                (n =
                                                                    e.t0 instanceof
                                                                    k.ChannelMediaError
                                                                        ? e.t0
                                                                              .message ===
                                                                              k
                                                                                  .CHANNEL_MEDIA_ERROR
                                                                                  .REQUEST_TIMEOUT ||
                                                                          e.t0
                                                                              .message ===
                                                                              k
                                                                                  .CHANNEL_MEDIA_ERROR
                                                                                  .WAIT_STATUS_TIMEOUT
                                                                            ? "SERVER_NO_RESPONSE"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .REQUEST_FAILED ||
                                                                              e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .WAIT_STATUS_ERROR
                                                                            ? "SERVER_ERROR_RESPONSE"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .WS_ABORT ||
                                                                              e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .AP_REQUEST_ABORT
                                                                            ? "OPERATION_ABORT"
                                                                            : "INTERNAL_ERROR"
                                                                        : "INTERNAL_ERROR"),
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-event",
                                                                        code:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_EVENT
                                                                                .PACKET_UPDATE_DEST_CHANNEL_REFUSED
                                                                    }
                                                                ),
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-state",
                                                                        state: i,
                                                                        code:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_ERROR[
                                                                                n
                                                                            ]
                                                                    }
                                                                ),
                                                                this
                                                                    .channelMediaRelayController &&
                                                                    (this.channelMediaRelayController.dispose(),
                                                                    (this.channelMediaConfig = null),
                                                                    (this.channelMediaRelayController = null)),
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-state",
                                                                        state:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_STATE
                                                                                .RELAY_STATE_IDLE
                                                                    }
                                                                ),
                                                                new k.ChannelMediaError(
                                                                    n,
                                                                    null,
                                                                    k.CHANNEL_MEDIA_RELAY_ERROR[
                                                                        n
                                                                    ]
                                                                ));
                                                            case 18:
                                                                this.channelMediaConfig = t;
                                                            case 19:
                                                            case "end":
                                                                return e.stop();
                                                        }
                                                },
                                                e,
                                                this,
                                                [[2, 7]]
                                            );
                                        })
                                    )),
                                    function(e) {
                                        return i.apply(this, arguments);
                                    })
                            },
                            {
                                key: "stopChannelMediaRelay",
                                value:
                                    ((t = c()(
                                        h.a.mark(function e() {
                                            var t, i;
                                            return h.a.wrap(
                                                function(e) {
                                                    for (;;)
                                                        switch (
                                                            (e.prev = e.next)
                                                        ) {
                                                            case 0:
                                                                if (
                                                                    this
                                                                        .channelMediaRelayController
                                                                ) {
                                                                    e.next = 2;
                                                                    break;
                                                                }
                                                                throw new k.ChannelMediaError(
                                                                    "RELAY_NOT_START",
                                                                    null,
                                                                    k.CHANNEL_MEDIA_RELAY_ERROR.RELAY_NOT_START
                                                                );
                                                            case 2:
                                                                return (
                                                                    (e.prev = 2),
                                                                    (e.next = 5),
                                                                    this.channelMediaRelayController.stopChannelMediaRelay()
                                                                );
                                                            case 5:
                                                                e.next = 17;
                                                                break;
                                                            case 7:
                                                                throw ((e.prev = 7),
                                                                (e.t0 = e.catch(
                                                                    2
                                                                )),
                                                                d.default.debug(
                                                                    "["
                                                                        .concat(
                                                                            this
                                                                                .clientId,
                                                                            "] stopChannelMediaRelay exception: "
                                                                        )
                                                                        .concat(
                                                                            JSON.stringify(
                                                                                e.t0
                                                                            )
                                                                        )
                                                                ),
                                                                (t =
                                                                    k
                                                                        .CHANNEL_MEDIA_RELAY_STATE
                                                                        .RELAY_STATE_FAILURE),
                                                                (i = ""),
                                                                (i =
                                                                    e.t0 instanceof
                                                                    k.ChannelMediaError
                                                                        ? e.t0
                                                                              .message ===
                                                                              k
                                                                                  .CHANNEL_MEDIA_ERROR
                                                                                  .REQUEST_TIMEOUT ||
                                                                          e.t0
                                                                              .message ===
                                                                              k
                                                                                  .CHANNEL_MEDIA_ERROR
                                                                                  .WAIT_STATUS_TIMEOUT
                                                                            ? "SERVER_NO_RESPONSE"
                                                                            : e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .REQUEST_FAILED ||
                                                                              e
                                                                                  .t0
                                                                                  .message ===
                                                                                  k
                                                                                      .CHANNEL_MEDIA_ERROR
                                                                                      .WAIT_STATUS_ERROR
                                                                            ? "SERVER_ERROR_RESPONSE"
                                                                            : "INTERNAL_ERROR"
                                                                        : "INTERNAL_ERROR"),
                                                                this.clientEmitter.emit(
                                                                    {
                                                                        type:
                                                                            "channel-media-relay-state",
                                                                        state: t,
                                                                        code:
                                                                            k
                                                                                .CHANNEL_MEDIA_RELAY_ERROR[
                                                                                i
                                                                            ]
                                                                    }
                                                                ),
                                                                this
                                                                    .channelMediaRelayController &&
                                                                    (this.channelMediaRelayController.dispose(),
                                                                    (this.channelMediaConfig = null),
                                                                    (this.channelMediaRelayController = null)),
                                                                this.emit({
                                                                    type:
                                                                        "channel-media-relay-state",
                                                                    state:
                                                                        k
                                                                            .CHANNEL_MEDIA_RELAY_STATE
                                                                            .RELAY_STATE_IDLE
                                                                }),
                                                                new k.ChannelMediaError(
                                                                    i,
                                                                    null,
                                                                    k.CHANNEL_MEDIA_RELAY_ERROR[
                                                                        i
                                                                    ]
                                                                ));
                                                            case 17:
                                                                (this.channelMediaConfig = null),
                                                                    (this.channelMediaRelayController = null);
                                                            case 19:
                                                            case "end":
                                                                return e.stop();
                                                        }
                                                },
                                                e,
                                                this,
                                                [[2, 7]]
                                            );
                                        })
                                    )),
                                    function() {
                                        return t.apply(this, arguments);
                                    })
                            }
                        ]),
                        e
                    );
                })(),
                C = i(34).ReportServiceClient,
                N = i(9).default,
                A = i(17).VosdkHeader,
                L = i(16),
                M = (function() {
                    function e() {
                        r()(this, e),
                            (this.transport = new N.TXHRTransport(
                                "https://uni-webcollector.agora.io/report"
                            )),
                            (this.protocol = new N.TJSONProtocol(
                                this.transport
                            )),
                            (this.client = new C(this.protocol)),
                            (this.seqId = 0),
                            (this._cache = []),
                            (this.isReporting = !1),
                            (this.retryCount = 0);
                    }
                    return (
                        a()(e, [
                            {
                                key: "generateHeader",
                                value: function(e) {
                                    if (e && e.sid)
                                        return new A({
                                            sid: e.sid,
                                            cname: e.cname || "",
                                            lts: e.lts,
                                            elapse: e.lts - this.startTime,
                                            uid: e.uid,
                                            success: e.success
                                        });
                                }
                            },
                            {
                                key: "report",
                                value: function(e, t) {
                                    var i = null;
                                    if (
                                        (t.header &&
                                            ((t.header.lts = +new Date()),
                                            "sessionStart" === e &&
                                                (this.startTime = t.header.lts),
                                            (i = this.generateHeader(
                                                t.header
                                            ))),
                                        t.body && i)
                                    ) {
                                        var n = t.body;
                                        switch (e) {
                                            case "sessionStart":
                                                ((r = new L({
                                                    miniappSession: !0
                                                })).uri = 8e3),
                                                    (r.miniappSession.header = i),
                                                    (r.miniappSession.appid =
                                                        n.appId),
                                                    (r.miniappSession.uname =
                                                        n.uname),
                                                    (r.miniappSession.ver =
                                                        l.SDK_VERSION),
                                                    (r.miniappSession.dk =
                                                        n.dk),
                                                    (r.miniappSession.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "chooseServer":
                                                ((r = new L({
                                                    miniappJoinChooseServer: !0
                                                })).uri = 8001),
                                                    (r.miniappJoinChooseServer.header = i),
                                                    (r.miniappJoinChooseServer.csurl =
                                                        n.csurl),
                                                    (r.miniappJoinChooseServer.ec =
                                                        n.ec),
                                                    (r.miniappJoinChooseServer.gatewaylist =
                                                        n.gatewaylist),
                                                    (r.miniappJoinChooseServer.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "connectWebSocket":
                                                ((r = new L({
                                                    miniappConnectWebSocket: !0
                                                })).uri = 8002),
                                                    (r.miniappConnectWebSocket.header = i),
                                                    (r.miniappConnectWebSocket.ec =
                                                        n.ec),
                                                    (r.miniappConnectWebSocket.wsurl =
                                                        n.wsurl),
                                                    (r.miniappConnectWebSocket.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "join":
                                                ((r = new L({
                                                    miniappJoin: !0
                                                })).uri = 8003),
                                                    (r.miniappJoin.header = i),
                                                    (r.miniappJoin.ec = n.ec),
                                                    (r.miniappJoin.isrejoin =
                                                        n.isrejoin),
                                                    (r.miniappJoin.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++,
                                                            appId: n.appId,
                                                            wsurl: n.wsurl
                                                        }
                                                    ));
                                                break;
                                            case "publish":
                                                ((r = new L({
                                                    miniappPublish: !0
                                                })).uri = 8004),
                                                    (r.miniappPublish.header = i),
                                                    (r.miniappPublish.ec =
                                                        n.ec),
                                                    (r.miniappPublish.pushurl =
                                                        n.pushurl),
                                                    (r.miniappPublish.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "unpublish":
                                                ((r = new L({
                                                    miniappUnpublish: !0
                                                })).uri = 8005),
                                                    (r.miniappUnpublish.header = i),
                                                    (r.miniappUnpublish.ec =
                                                        n.ec),
                                                    (r.miniappUnpublish.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "subscribe":
                                                ((r = new L({
                                                    miniappSubscribe: !0
                                                })).uri = 8006),
                                                    (r.miniappSubscribe.header = i),
                                                    (r.miniappSubscribe.ec =
                                                        n.ec),
                                                    (r.miniappSubscribe.pullurl =
                                                        n.pullurl),
                                                    (r.miniappSubscribe.peerid =
                                                        n.peerid),
                                                    (r.miniappSubscribe.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "unsubscribe":
                                                ((r = new L({
                                                    miniappUnsubscribe: !0
                                                })).uri = 8007),
                                                    (r.miniappUnsubscribe.header = i),
                                                    (r.miniappUnsubscribe.ec =
                                                        n.ec),
                                                    (r.miniappUnsubscribe.peerid =
                                                        n.peerid),
                                                    (r.miniappUnsubscribe.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "leave":
                                                ((r = new L({
                                                    miniappLeave: !0
                                                })).uri = 8008),
                                                    (r.miniappLeave.header = i),
                                                    (r.miniappLeave.ec = n.ec),
                                                    (r.miniappLeave.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "pusherState":
                                                ((r = new L({
                                                    miniappPusherState: !0
                                                })).uri = 8010),
                                                    (r.miniappPusherState.header = i),
                                                    (r.miniappPusherState.url =
                                                        n.url),
                                                    (r.miniappPusherState.code =
                                                        n.code),
                                                    (r.miniappPusherState.status =
                                                        n.status),
                                                    (r.miniappPusherState.error =
                                                        n.error),
                                                    (r.miniappPusherState.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "playerState":
                                                ((r = new L({
                                                    miniappPlayerState: !0
                                                })).uri = 8011),
                                                    (r.miniappPlayerState.header = i),
                                                    (r.miniappPlayerState.url =
                                                        n.url),
                                                    (r.miniappPlayerState.code =
                                                        n.code),
                                                    (r.miniappPlayerState.status =
                                                        n.status),
                                                    (r.miniappPlayerState.error =
                                                        n.error),
                                                    (r.miniappPlayerState.details = JSON.stringify(
                                                        {
                                                            seq: this.seqId++
                                                        }
                                                    ));
                                                break;
                                            case "serverEvent":
                                                ((r = new L({
                                                    miniappServerEvent: !0
                                                })).uri = 8009),
                                                    (r.miniappServerEvent.header = i),
                                                    (r.miniappServerEvent.action =
                                                        n.action),
                                                    (r.miniappServerEvent.details = JSON.stringify(
                                                        n.details
                                                    )),
                                                    (r.miniappServerEvent.req_ts =
                                                        n.req_ts);
                                        }
                                    }
                                    if (
                                        (this._cache.push(r),
                                        !this.isReporting &&
                                            this._cache.length > 0)
                                    ) {
                                        var r = this._cache.shift();
                                        this._report(r);
                                    }
                                }
                            },
                            {
                                key: "_report",
                                value: function(e) {
                                    var t = this;
                                    (this.isReporting = !0),
                                        this.client.Report(e, function(i) {
                                            if (i) {
                                                d.default.debug(
                                                    "Report failed: ",
                                                    i,
                                                    e
                                                );
                                                var n =
                                                    t.retryCount++ < 2
                                                        ? 200
                                                        : 1e4;
                                                setTimeout(function() {
                                                    t._report(e);
                                                }, n);
                                            } else {
                                                d.default.debug(
                                                    "Report succcess: ",
                                                    e
                                                );
                                                var r = t._cache.shift();
                                                r
                                                    ? t._report(r)
                                                    : (t.isReporting = !1);
                                            }
                                        });
                                }
                            }
                        ]),
                        e
                    );
                })(),
                j = i(10),
                B = i.n(j),
                D = i(22),
                F = i.n(D),
                U = {
                    videoBitrate: "Miniapp_SDK_Pusher_Video_Bitrate",
                    audioBitrate: "Miniapp_SDK_Pusher_Audio_Bitrate",
                    videoFPS: "Miniapp_SDK_Pusher_Video_FPS",
                    videoGOP: "Miniapp_SDK_Pusher_Video_GOP",
                    netSpeed: "Miniapp_SDK_Pusher_Net_Speed",
                    videoCache: "Miniapp_SDK_Pusher_Video_Cache",
                    audioCache: "Miniapp_SDK_Pusher_Audio_Cache",
                    videoWidth: "Miniapp_SDK_Pusher_Video_Width",
                    videoHeight: "Miniapp_SDK_Pusher_Video_Height",
                    netJitter: "Miniapp_SDK_Pusher_Net_Jitter",
                    netQualityLevel: "Miniapp_SDK_Pusher_Net_QualityLevel"
                },
                x = {
                    videoBitrate: "Miniapp_SDK_Player_Video_Bitrate",
                    audioBitrate: "Miniapp_SDK_Player_Audio_Bitrate",
                    videoFPS: "Miniapp_SDK_Player_Video_FPS",
                    videoGOP: "Miniapp_SDK_Player_Video_GOP",
                    netSpeed: "Miniapp_SDK_Player_Net_Speed",
                    videoCache: "Miniapp_SDK_Player_Video_Cache",
                    audioCache: "Miniapp_SDK_Player_Audio_Cache",
                    vDecCacheSize: "Miniapp_SDK_Player_V_Dec_Cache_Size",
                    vSumCacheSize: "Miniapp_SDK_Player_V_Sum_Cache_Size",
                    avPlayInterval: "Miniapp_SDK_Player_AV_Play_Interval",
                    avRecvInterval: "Miniapp_SDK_Player_AV_Recv_Interval",
                    audioCacheThreshold:
                        "Miniapp_SDK_Player_Audio_Cache_Threshold",
                    videoWidth: "Miniapp_SDK_Player_Video_Width",
                    videoHeight: "Miniapp_SDK_Player_Video_Height",
                    netJitter: "Miniapp_SDK_Player_Net_Jitter",
                    netQualityLevel: "Miniapp_SDK_Player_Net_QualityLevel"
                },
                q = i(23),
                J = i.n(q);
            function V(e, t) {
                !(function() {
                    var e =
                        arguments.length > 0 && void 0 !== arguments[0]
                            ? arguments[0]
                            : 1;
                    if (null == e) e = 1;
                    else if (0 === e)
                        throw new Error("Concurrency must not be zero");
                })(t);
                var i = [],
                    n = [];
                return {
                    concurrency: t,
                    push: function(e, t) {
                        var n = this;
                        i.push({
                            task: e,
                            callback: t
                        }),
                            setTimeout(function() {
                                n.process();
                            }, 0);
                    },
                    process: function() {
                        for (
                            var t = this,
                                r = function() {
                                    var r,
                                        s = i.shift();
                                    n.push(s),
                                        e(
                                            s.task,
                                            ((r = function() {
                                                t.pull(s),
                                                    "function" ==
                                                        typeof s.callback &&
                                                        s.callback.apply(
                                                            s,
                                                            arguments
                                                        ),
                                                    t.process();
                                            }),
                                            function() {
                                                if (null === r)
                                                    throw new Error(
                                                        "Callback was already called"
                                                    );
                                                var e = r;
                                                return (
                                                    (r = null),
                                                    e.apply(void 0, arguments)
                                                );
                                            })
                                        );
                                };
                            this.concurrency > n.length && i.length;

                        )
                            r();
                    },
                    pull: function(e) {
                        var t = n.indexOf(e);
                        -1 !== t && n.splice(t, 1);
                    }
                };
            }
            var W = (function(e) {
                var t =
                    arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : 10;
                if ("function" != typeof e)
                    throw Error("request must be function");
                var i = V(function(e, t) {
                    return e(t);
                }, t);
                return function(t) {
                    i.push(function(i) {
                        var n = t.complete;
                        (t.complete = function() {
                            i(),
                                "function" == typeof n &&
                                    n.apply(void 0, arguments);
                        }),
                            e(t);
                    });
                };
            })(wx.request, 2);
            function G(e, t) {
                var i = Object.keys(e);
                if (Object.getOwnPropertySymbols) {
                    var n = Object.getOwnPropertySymbols(e);
                    t &&
                        (n = n.filter(function(t) {
                            return Object.getOwnPropertyDescriptor(
                                e,
                                t
                            ).enumerable;
                        })),
                        i.push.apply(i, n);
                }
                return i;
            }
            function K(e) {
                for (var t = 1; t < arguments.length; t++) {
                    var i = null != arguments[t] ? arguments[t] : {};
                    t % 2
                        ? G(Object(i), !0).forEach(function(t) {
                              F()(e, t, i[t]);
                          })
                        : Object.getOwnPropertyDescriptors
                        ? Object.defineProperties(
                              e,
                              Object.getOwnPropertyDescriptors(i)
                          )
                        : G(Object(i)).forEach(function(t) {
                              Object.defineProperty(
                                  e,
                                  t,
                                  Object.getOwnPropertyDescriptor(i, t)
                              );
                          });
                }
                return e;
            }
            var H = J.a.io.agora.pb,
                Y = H.CounterCompact,
                z = H.Id,
                Q = H.MuteLocal,
                $ = H.MuteRemote,
                X = H.Join,
                Z = H.Leave,
                ee = H.Publish,
                te = H.Unpublish,
                ie = H.Subscribe,
                ne = H.Unsubscribe,
                re = H.ConnectWebSocket,
                se = H.ServerEvent,
                ae = H.JoinChooseServer,
                oe = H.RenewToken,
                le = H.SetRemoteVideoStreamType,
                ue = H.SetRole,
                ce = H.Session,
                pe = H.PusherState,
                he = H.PlayerState,
                de = (function() {
                    function e() {
                        r()(this, e),
                            (this.url =
                                "https://rest-argus-ad.agoralab.co/v2/report"),
                            (this.sid = Object(o.generateSessionId)()),
                            (this.pusherNet = null),
                            (this.playerNetMap = {}),
                            (this.pusherTimer = null),
                            (this.playerTimer = null),
                            (this.seqId = 0),
                            this.startPusherReport(),
                            this.startPlayerReport();
                    }
                    return (
                        a()(e, [
                            {
                                key: "setPusherNetData",
                                value: function(e) {
                                    this.pusherNet = e;
                                }
                            },
                            {
                                key: "setPlayerNetData",
                                value: function(e, t) {
                                    this.playerNetMap[e] = t;
                                }
                            },
                            {
                                key: "getMessageTypeId",
                                value: function(e) {
                                    return z[e];
                                }
                            },
                            {
                                key: "encodePb",
                                value: function(e, t, i) {
                                    var n = null,
                                        r = null;
                                    switch (t) {
                                        case "pusher_net":
                                        case "player_net":
                                            (r = Y.create({
                                                sid: this.sid,
                                                peer: i.peerId,
                                                items: i.items
                                            })),
                                                (n = Y.encode(r).finish());
                                            break;
                                        case "api_join":
                                            (r = X.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                }),
                                                isrejoin: i.isrejoin,
                                                ip: T().ip
                                            })),
                                                (n = X.encode(r).finish());
                                            break;
                                        case "api_leave":
                                            (r = Z.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                }),
                                                ip: T().ip
                                            })),
                                                (n = Z.encode(r).finish());
                                            break;
                                        case "api_publish":
                                            (r = ee.create({
                                                pushurl: i.pushurl,
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                }),
                                                ip: T().ip
                                            })),
                                                (n = ee.encode(r).finish());
                                            break;
                                        case "api_unpublish":
                                            (r = te.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                }),
                                                ip: T().ip
                                            })),
                                                (n = te.encode(r).finish());
                                            break;
                                        case "api_subscribe":
                                            (r = ie.create({
                                                pullurl: i.pullurl,
                                                peer: i.peer,
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                }),
                                                ip: T().ip
                                            })),
                                                (n = ie.encode(r).finish());
                                            break;
                                        case "api_unsubscribe":
                                            (r = ne.create({
                                                peer: i.peer,
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                }),
                                                ip: T().ip
                                            })),
                                                (n = ne.encode(r).finish());
                                            break;
                                        case "connect_websocket":
                                            (r = re.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: null,
                                                gateway: i.gateway,
                                                ec: i.ec,
                                                wsurl: i.wsurl,
                                                details: JSON.stringify({
                                                    seqId: this.seqId++
                                                })
                                            })),
                                                (n = re.encode(r).finish());
                                            break;
                                        case "join_chooseserver":
                                            (r = ae.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: null,
                                                csurl: i.csurl,
                                                ec: i.ec,
                                                gatewaylist: i.gatewaylist,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = ae.encode(r).finish());
                                            break;
                                        case "api_muteLocal":
                                            (r = Q.create({
                                                lts: e,
                                                vid: T().vid,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                target: i.target,
                                                mute: i.mute,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = Q.encode(r).finish());
                                            break;
                                        case "api_muteRemote":
                                            (r = $.create({
                                                lts: e,
                                                vid: T().vid,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: i.peer,
                                                ec: i.ec,
                                                target: i.target,
                                                mute: i.mute,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = $.encode(r).finish());
                                            break;
                                        case "api_renewToken":
                                            (r = oe.create({
                                                lts: e,
                                                vid: T().vid,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = oe.encode(r).finish());
                                            break;
                                        case "api_setRemoteStreamType":
                                            (r = le.create({
                                                lts: e,
                                                vid: T().vid,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                type: i.type,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = le.encode(r).finish());
                                            break;
                                        case "api_setRole":
                                            (r = ue.create({
                                                lts: e,
                                                vid: T().vid,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                ec: i.ec,
                                                type: i.type,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = ue.encode(r).finish());
                                            break;
                                        case "session":
                                            (r = ce.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: null,
                                                cid: null,
                                                ip: T().ip,
                                                uid: null,
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: null,
                                                appid: i.appId,
                                                uname: i.uname,
                                                ver: i.ver,
                                                dk: i.dk,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = ce.encode(r).finish());
                                            break;
                                        case "serverEvent":
                                            (r = se.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: null,
                                                action: i.action,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                ),
                                                req_ts: null
                                            })),
                                                (n = se.encode(r).finish());
                                            break;
                                        case "pusher_state":
                                            (r = pe.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: null,
                                                url: i.url,
                                                code: i.code,
                                                status: null,
                                                error: null,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = pe.encode(r).finish());
                                            break;
                                        case "player_state":
                                            (r = he.create({
                                                lts: e,
                                                sid: this.sid,
                                                cname: i.cname,
                                                cid: null,
                                                ip: T().ip,
                                                uid: "".concat(i.uid),
                                                success: i.success,
                                                elapse: i.elapse,
                                                peer: i.peer,
                                                url: i.url,
                                                code: i.code,
                                                status: null,
                                                error: null,
                                                details: JSON.stringify(
                                                    K(
                                                        K({}, i.details),
                                                        {},
                                                        {
                                                            seqId: this.seqId++
                                                        }
                                                    )
                                                )
                                            })),
                                                (n = he.encode(r).finish());
                                    }
                                    return n;
                                }
                            },
                            {
                                key: "startPusherReport",
                                value: function() {
                                    var e = this;
                                    this.pusherTimer = setInterval(function() {
                                        var t = Date.now();
                                        if (e.pusherNet) {
                                            var i = [];
                                            if (
                                                (Object.keys(e.pusherNet).map(
                                                    function(n) {
                                                        if (void 0 !== U[n]) {
                                                            var r = z[U[n]];
                                                            if (void 0 !== r) {
                                                                var s = {
                                                                    lts: t,
                                                                    id: r,
                                                                    value:
                                                                        e
                                                                            .pusherNet[
                                                                            n
                                                                        ],
                                                                    tagErrorCode: 6,
                                                                    streamId: 0
                                                                };
                                                                i.push(s);
                                                            }
                                                        }
                                                    }
                                                ),
                                                0 === i.length)
                                            )
                                                return d.default.warn(
                                                    "[argus] no kv exists for pusher data reporting"
                                                );
                                            var n = e.encodePb(
                                                t,
                                                "pusher_net",
                                                {
                                                    peerId: 0,
                                                    items: i
                                                }
                                            );
                                            e.report(t, n, 1);
                                        }
                                    }, 6e3);
                                }
                            },
                            {
                                key: "startPlayerReport",
                                value: function() {
                                    var e = this;
                                    this.playerTimer = setInterval(function() {
                                        var t = Date.now();
                                        if (e.playerNetMap) {
                                            var i = function(i) {
                                                var n = [],
                                                    r = e.playerNetMap[i];
                                                if (
                                                    (Object.keys(r).map(
                                                        function(e) {
                                                            if (
                                                                void 0 !== x[e]
                                                            ) {
                                                                var i = z[x[e]];
                                                                if (
                                                                    void 0 !== i
                                                                ) {
                                                                    var s = {
                                                                        lts: t,
                                                                        id: i,
                                                                        value:
                                                                            r[
                                                                                e
                                                                            ],
                                                                        tagErrorCode: 6,
                                                                        streamId: 0
                                                                    };
                                                                    n.push(s);
                                                                }
                                                            }
                                                        }
                                                    ),
                                                    0 === n.length)
                                                )
                                                    return {
                                                        v: d.default.warn(
                                                            "[argus] no kv exists for live data reporting"
                                                        )
                                                    };
                                                var s = e.encodePb(
                                                    t,
                                                    "player_net",
                                                    {
                                                        peerId: i,
                                                        items: n
                                                    }
                                                );
                                                e.report(t, s, 1);
                                            };
                                            for (var n in e.playerNetMap) {
                                                var r = i(n);
                                                if ("object" === B()(r))
                                                    return r.v;
                                            }
                                        }
                                        e.playerNetMap = {};
                                    }, 6e3);
                                }
                            },
                            {
                                key: "_silent_call",
                                value: function(e) {
                                    var t = this;
                                    return function() {
                                        try {
                                            e.apply(t, arguments);
                                        } catch (e) {}
                                    };
                                }
                            },
                            {
                                key: "reportJoin",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "api_join",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            isrejoin: !1,
                                            ec: r,
                                            appId: s,
                                            wsurl: a
                                        },
                                        9292
                                    );
                                }
                            },
                            {
                                key: "reportRejoin",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "api_join",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            isrejoin: !0,
                                            ec: r,
                                            appId: s,
                                            wsurl: a
                                        },
                                        9292
                                    );
                                }
                            },
                            {
                                key: "reportLeave",
                                value: function(e, t, i, n, r) {
                                    this._silent_call(this.reportAPI)(
                                        "api_leave",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r
                                        },
                                        9297
                                    );
                                }
                            },
                            {
                                key: "reportPublish",
                                value: function(e, t, i, n, r, s) {
                                    this._silent_call(this.reportAPI)(
                                        "api_publish",
                                        {
                                            pushurl: e,
                                            cname: t,
                                            uid: i,
                                            success: n,
                                            elapse: r,
                                            ec: s
                                        },
                                        9293
                                    );
                                }
                            },
                            {
                                key: "reportUnPublish",
                                value: function(e, t, i, n, r) {
                                    this._silent_call(this.reportAPI)(
                                        "api_unpublish",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r
                                        },
                                        9294
                                    );
                                }
                            },
                            {
                                key: "reportSubscribe",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "api_subscribe",
                                        {
                                            pullurl: e,
                                            peer: t,
                                            cname: i,
                                            uid: n,
                                            success: r,
                                            elapse: s,
                                            ec: a
                                        },
                                        9295
                                    );
                                }
                            },
                            {
                                key: "reportUnSubscribe",
                                value: function(e, t, i, n, r, s) {
                                    this._silent_call(this.reportAPI)(
                                        "api_unsubscribe",
                                        {
                                            peer: e,
                                            cname: t,
                                            uid: i,
                                            success: n,
                                            elapse: r,
                                            ec: s
                                        },
                                        9296
                                    );
                                }
                            },
                            {
                                key: "reportConnectWS",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "connect_websocket",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            gateway: s,
                                            wsurl: a
                                        },
                                        9291
                                    );
                                }
                            },
                            {
                                key: "reportJoinCS",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "join_chooseserver",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            csurl: s,
                                            gatewaylist: a
                                        },
                                        9290
                                    );
                                }
                            },
                            {
                                key: "reportMuteLocal",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "api_muteLocal",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            target: s,
                                            mute: a
                                        },
                                        9798
                                    );
                                }
                            },
                            {
                                key: "reportMuteRemote",
                                value: function(e, t, i, n, r, s, a, o) {
                                    this._silent_call(this.reportAPI)(
                                        "api_muteRemote",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            peer: s,
                                            target: a,
                                            mute: o
                                        },
                                        9794
                                    );
                                }
                            },
                            {
                                key: "reportRenewToken",
                                value: function(e, t, i, n, r) {
                                    this._silent_call(this.reportAPI)(
                                        "api_renewToken",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r
                                        },
                                        9800
                                    );
                                }
                            },
                            {
                                key: "reportSetRemoteStreamType",
                                value: function(e, t, i, n, r, s) {
                                    this._silent_call(this.reportAPI)(
                                        "api_setRemoteStreamType",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            type: s
                                        },
                                        9799
                                    );
                                }
                            },
                            {
                                key: "reportSetRole",
                                value: function(e, t, i, n, r, s) {
                                    this._silent_call(this.reportAPI)(
                                        "api_setRole",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            role: "broadcaster" === s ? 1 : 2
                                        },
                                        9801
                                    );
                                }
                            },
                            {
                                key: "reportSession",
                                value: function(e, t, i, n, r, s, a, o, l) {
                                    this._silent_call(this.reportAPI)(
                                        "session",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            ec: r,
                                            appId: s,
                                            uname: a,
                                            ver: o,
                                            dk: l
                                        },
                                        9289
                                    );
                                }
                            },
                            {
                                key: "reportServerEvent",
                                value: function(e, t, i, n, r, s) {
                                    this._silent_call(this.reportAPI)(
                                        "serverEvent",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            action: r,
                                            details: s
                                        },
                                        9298
                                    );
                                }
                            },
                            {
                                key: "reportPusherStateChange",
                                value: function(e, t, i, n, r, s, a) {
                                    this._silent_call(this.reportAPI)(
                                        "pusher_state",
                                        {
                                            cname: e,
                                            uid: t,
                                            success: i,
                                            elapse: n,
                                            url: r,
                                            code: s,
                                            message: a
                                        },
                                        9300
                                    );
                                }
                            },
                            {
                                key: "reportPlayerStateChange",
                                value: function(e, t, i, n, r, s, a, o) {
                                    this._silent_call(this.reportAPI)(
                                        "player_state",
                                        {
                                            peer: e,
                                            cname: t,
                                            uid: i,
                                            success: n,
                                            elapse: r,
                                            url: s,
                                            code: a,
                                            message: o
                                        },
                                        9301
                                    );
                                }
                            },
                            {
                                key: "reportAPI",
                                value: function(e, t, i) {
                                    var n = Date.now(),
                                        r = this.encodePb(n, e, t);
                                    r && this.report(n, r, i);
                                }
                            },
                            {
                                key: "destroy",
                                value: function() {
                                    null !== this.pusherTimer &&
                                        clearInterval(this.pusherTimer),
                                        null !== this.playerTimer &&
                                            clearInterval(this.playerTimer),
                                        (this.pusherNet = null),
                                        (this.playerNet = null);
                                }
                            },
                            {
                                key: "report",
                                value: function(e, t, i) {
                                    var n = wx.arrayBufferToBase64(t),
                                        r = {
                                            id: i,
                                            payload: n,
                                            qos: 1,
                                            sign: w()(
                                                "payload="
                                                    .concat(
                                                        n,
                                                        "&src=miniapp_sdk&ts="
                                                    )
                                                    .concat(e)
                                            ),
                                            src: "miniapp_sdk",
                                            ts: e,
                                            vid: T().vid
                                        };
                                    return this.request({
                                        body: r,
                                        url: this.url
                                    });
                                }
                            },
                            {
                                key: "request",
                                value: function(e) {
                                    return new Promise(function(t, i) {
                                        d.default.debug(
                                            "[argus] weixin request argus report begins"
                                        ),
                                            W({
                                                url: e.url,
                                                data: e.body,
                                                timeout: 1e4,
                                                header: {
                                                    "Content-Type":
                                                        "application/json",
                                                    "Request-ID": "".concat(
                                                        new Date().getTime()
                                                    )
                                                },
                                                method: "POST",
                                                success: function(e) {
                                                    d.default.debug(
                                                        "[argus] weixin request argus report success"
                                                    ),
                                                        200 === e.statusCode
                                                            ? (d.default.debug(
                                                                  "[argus] response 200"
                                                              ),
                                                              t(e))
                                                            : d.default.warn(
                                                                  "[argus] response fail: ".concat(
                                                                      e.statusCode
                                                                  )
                                                              );
                                                },
                                                fail: function(e) {
                                                    d.default.warn(
                                                        "[argus] weixin request argus report fail"
                                                    ),
                                                        i(e);
                                                }
                                            });
                                    });
                                }
                            }
                        ]),
                        e
                    );
                })(),
                fe = i(6),
                ye = (function() {
                    function e(t) {
                        var i = this;
                        r()(this, e),
                            (this.emitter = new f()),
                            (this.on = this.emitter.on),
                            (this.off = this.emitter.off),
                            (this.sid = Object(o.generateSessionId)()),
                            (this.pushUrl = null),
                            (this.playUrls = new Map()),
                            (this.servers = t && t.servers),
                            (this.reportManager = new M()),
                            (this.role = "broadcaster"),
                            (this.audioCodec = null),
                            (this.grafanaReport = new m()),
                            (this.argusReport = new de()),
                            (this.systemInfo = null),
                            this.emitter.on("stream-removed", function(e) {
                                i.playUrls && i.playUrls.delete(e.uid),
                                    delete i.argusReport.playerNetMap[e.uid];
                            }),
                            (this.targetMap = {
                                audio: 0,
                                video: 1,
                                all: 2
                            });
                    }
                    return (
                        a()(e, [
                            {
                                key: "init",
                                value: function(e, t, i) {
                                    if (
                                        e &&
                                        "string" == typeof e &&
                                        "null" !== e.toLowerCase()
                                    ) {
                                        (this.appId = e.trim()),
                                            (this.argusReport.sid = this.sid),
                                            (this.grafanaReport.vid = ""),
                                            this.grafanaReport.onlineUser();
                                        try {
                                            this.systemInfo = wx.getSystemInfoSync();
                                        } catch (e) {}
                                        this.argusReport.reportSession(
                                            null,
                                            null,
                                            !0,
                                            0,
                                            null,
                                            this.appId,
                                            this.systemInfo.platform,
                                            l.SDK_VERSION,
                                            this.systemInfo.brand +
                                                "/" +
                                                this.systemInfo.model
                                        ),
                                            t && t();
                                    } else i(new Error("Invalid appId"));
                                }
                            },
                            {
                                key: "setAudioCodec",
                                value: function(e) {
                                    this.audioCodec = e;
                                }
                            },
                            {
                                key: "setRole",
                                value: function(e, t, i) {
                                    var n = this;
                                    if (
                                        "broadcaster" !== !e ||
                                        "audience" !== !e
                                    ) {
                                        if (((this.role = e), this.worker)) {
                                            var r = _.create().start();
                                            this.worker
                                                .setRole(e)
                                                .then(function(i) {
                                                    n.argusReport.reportSetRole(
                                                        n.channel,
                                                        n.uid,
                                                        !0,
                                                        r.elapse(),
                                                        null,
                                                        e
                                                    ),
                                                        setTimeout(function() {
                                                            if (!i)
                                                                return t && t();
                                                            t &&
                                                                t({
                                                                    updateURL:
                                                                        i[
                                                                            "update-url"
                                                                        ]
                                                                });
                                                        }, 1);
                                                })
                                                .catch(function(t) {
                                                    n.argusReport.reportSetRole(
                                                        n.channel,
                                                        n.uid,
                                                        !1,
                                                        r.elapse(),
                                                        JSON.stringify(t),
                                                        e
                                                    ),
                                                        i && i();
                                                });
                                        }
                                    } else i(new Error("Invalid role"));
                                }
                            },
                            {
                                key: "rejoin",
                                value: function(e, t, i, n, r, s) {
                                    var a = this,
                                        l =
                                            arguments.length > 6 &&
                                            void 0 !== arguments[6] &&
                                            arguments[6],
                                        u =
                                            arguments.length > 7 &&
                                            void 0 !== arguments[7]
                                                ? arguments[7]
                                                : 0;
                                    if (!this.worker) {
                                        if (e) {
                                            if (
                                                "string" != typeof e ||
                                                "null" === e.toLowerCase()
                                            )
                                                return void s(
                                                    new Error(
                                                        "Invalid channelKey"
                                                    )
                                                );
                                        } else e = this.appId;
                                        if (
                                            !t ||
                                            "string" != typeof t ||
                                            "null" === t.toLowerCase() ||
                                            t.length > 128
                                        )
                                            s(new Error("Invalid channel"));
                                        else {
                                            if (1 == u) {
                                                if (!i.trim())
                                                    return void s(
                                                        new Error("uid empty")
                                                    );
                                                this.uid = i;
                                            } else if (
                                                ((this.uid =
                                                    i || Object(o.random)(1e7)),
                                                (this.uid = Number.parseInt(
                                                    this.uid
                                                )),
                                                !Object(o.is32Uint)(this.uid))
                                            )
                                                return void s(
                                                    new Error(
                                                        "Invalid uid type"
                                                    )
                                                );
                                            (this.channel = t),
                                                (this.worker = new P(
                                                    {
                                                        appId: this.appId,
                                                        channel: this.channel,
                                                        uid: this.uid,
                                                        sid: this.sid,
                                                        role: this.role,
                                                        servers: this.servers,
                                                        channelKey: e,
                                                        reportManager: this
                                                            .reportManager,
                                                        grafanaReport: this
                                                            .grafanaReport,
                                                        argusReport: this
                                                            .argusReport,
                                                        audioCodec: this
                                                            .audioCodec,
                                                        uidType: u
                                                    },
                                                    this.emitter
                                                ));
                                            var c = _.create().start();
                                            this.worker
                                                .connect()
                                                .then(function() {
                                                    return a.worker.rejoin(
                                                        n,
                                                        l
                                                    );
                                                })
                                                .then(function(e) {
                                                    a.argusReport.reportRejoin(
                                                        a.channel,
                                                        a.uid,
                                                        !0,
                                                        c.elapse(),
                                                        null,
                                                        a.appId,
                                                        a.worker &&
                                                            a.worker.getWSUrl()
                                                    ),
                                                        setTimeout(function() {
                                                            r && r(this.uid);
                                                        }, 1),
                                                        e &&
                                                            e.uid &&
                                                            ((a.uid = e.uid),
                                                            (a.worker.uid =
                                                                e.uid));
                                                })
                                                .catch(function(e) {
                                                    a.argusReport.reportRejoin(
                                                        a.channel,
                                                        a.uid,
                                                        !1,
                                                        c.elapse(),
                                                        JSON.stringify(e),
                                                        a.appId,
                                                        a.worker &&
                                                            a.worker.getWSUrl()
                                                    ),
                                                        a.destroy(),
                                                        s && s(e);
                                                });
                                        }
                                    }
                                }
                            },
                            {
                                key: "join",
                                value: function(e, t, i, n, r) {
                                    var s = this,
                                        a =
                                            arguments.length > 5 &&
                                            void 0 !== arguments[5] &&
                                            arguments[5],
                                        l =
                                            arguments.length > 6 &&
                                            void 0 !== arguments[6]
                                                ? arguments[6]
                                                : 0;
                                    if (!this.worker) {
                                        if (e) {
                                            if (
                                                "string" != typeof e ||
                                                "null" === e.toLowerCase()
                                            )
                                                return void r(
                                                    new Error(
                                                        "Invalid channelKey"
                                                    )
                                                );
                                        } else e = this.appId;
                                        if (
                                            !t ||
                                            "string" != typeof t ||
                                            "null" === t.toLowerCase() ||
                                            t.length > 128
                                        )
                                            r(new Error("Invalid channel"));
                                        else {
                                            if (1 == l) {
                                                if (!i.trim())
                                                    return void r(
                                                        new Error("uid empty")
                                                    );
                                                this.uid = i;
                                            } else if (
                                                ((this.uid =
                                                    i || Object(o.random)(1e7)),
                                                (this.uid = Number.parseInt(
                                                    this.uid
                                                )),
                                                !Object(o.is32Uint)(this.uid))
                                            )
                                                return void r(
                                                    new Error(
                                                        "Invalid uid type"
                                                    )
                                                );
                                            (this.channel = t),
                                                (this.worker = new P(
                                                    {
                                                        appId: this.appId,
                                                        channel: this.channel,
                                                        uid: this.uid,
                                                        sid: this.sid,
                                                        role: this.role,
                                                        servers: this.servers,
                                                        channelKey: e,
                                                        reportManager: this
                                                            .reportManager,
                                                        grafanaReport: this
                                                            .grafanaReport,
                                                        argusReport: this
                                                            .argusReport,
                                                        audioCodec: this
                                                            .audioCodec,
                                                        uidType: l
                                                    },
                                                    this.emitter
                                                ));
                                            var u = _.create().start();
                                            this.worker
                                                .connect()
                                                .then(function() {
                                                    return s.worker.join(
                                                        s.systemInfo.model,
                                                        s.systemInfo.system,
                                                        a
                                                    );
                                                })
                                                .then(function(e) {
                                                    s.argusReport.reportJoin(
                                                        s.channel,
                                                        s.uid,
                                                        !0,
                                                        u.elapse()
                                                    ),
                                                        setTimeout(function() {
                                                            n && n(this.uid);
                                                        }, 1),
                                                        e &&
                                                            e.uid &&
                                                            ((s.uid = e.uid),
                                                            (s.worker.uid =
                                                                e.uid));
                                                })
                                                .catch(function(e) {
                                                    s.argusReport.reportJoin(
                                                        s.channel,
                                                        s.uid,
                                                        !1,
                                                        u.elapse(),
                                                        JSON.stringify(e)
                                                    ),
                                                        s.destroy(),
                                                        r && r(e);
                                                });
                                        }
                                    }
                                }
                            },
                            {
                                key: "publish",
                                value: function(e, t) {
                                    var i = this;
                                    this._checkWorker();
                                    var n = _.create().start();
                                    this.worker
                                        .publish()
                                        .then(function(t) {
                                            (i.pushUrl = t.url),
                                                i.argusReport.reportPublish(
                                                    t.url,
                                                    i.channel,
                                                    i.uid,
                                                    !0,
                                                    n.elapse()
                                                ),
                                                setTimeout(function() {
                                                    e && e(t.url);
                                                }, 1);
                                        })
                                        .catch(function(e) {
                                            i.argusReport.reportPublish(
                                                null,
                                                i.channel,
                                                i.uid,
                                                !1,
                                                n.elapse(),
                                                JSON.stringify(e)
                                            ),
                                                t && t(e);
                                        });
                                }
                            },
                            {
                                key: "unpublish",
                                value: function(e, t) {
                                    var i = this;
                                    this._checkWorker();
                                    var n = _.create().start();
                                    this.worker
                                        .unpublish()
                                        .then(function(t) {
                                            (i.pushUrl = null),
                                                i.argusReport.reportUnPublish(
                                                    i.channel,
                                                    i.uid,
                                                    !0,
                                                    n.elapse()
                                                ),
                                                setTimeout(function() {
                                                    e && e();
                                                }, 1);
                                        })
                                        .catch(function(e) {
                                            i.argusReport.reportUnPublish(
                                                i.channel,
                                                i.uid,
                                                !1,
                                                n.elapse(),
                                                JSON.stringify(e)
                                            ),
                                                t && t(e);
                                        });
                                }
                            },
                            {
                                key: "subscribe",
                                value: function(e, t, i) {
                                    var n = this,
                                        r =
                                            arguments.length > 3 &&
                                            void 0 !== arguments[3]
                                                ? arguments[3]
                                                : {
                                                      audio: !0,
                                                      video: !0
                                                  };
                                    this._checkUid(e), this._checkWorker();
                                    var s = _.create().start();
                                    this.worker
                                        .subscribe(e, r)
                                        .then(function(i) {
                                            n.playUrls.set(e, i.url),
                                                n.argusReport.reportSubscribe(
                                                    i.url,
                                                    e,
                                                    n.channel,
                                                    n.uid,
                                                    !0,
                                                    s.elapse()
                                                ),
                                                setTimeout(function() {
                                                    t && t(i.url, i.rotation);
                                                }, 1);
                                        })
                                        .catch(function(t) {
                                            n.argusReport.reportSubscribe(
                                                null,
                                                e,
                                                n.channel,
                                                n.uid,
                                                !1,
                                                s.elapse(),
                                                JSON.stringify(t)
                                            ),
                                                i && i(t);
                                        });
                                }
                            },
                            {
                                key: "unsubscribe",
                                value: function(e, t, i) {
                                    var n = this;
                                    this._checkUid(e), this._checkWorker();
                                    var r = _.create().start();
                                    this.worker
                                        .unsubscribe(e)
                                        .then(function(i) {
                                            n.playUrls.delete(e),
                                                n.argusReport.reportUnSubscribe(
                                                    e,
                                                    n.channel,
                                                    n.uid,
                                                    !0,
                                                    r.elapse(),
                                                    null
                                                ),
                                                setTimeout(function() {
                                                    t && t();
                                                }, 1);
                                        })
                                        .catch(function(t) {
                                            n.argusReport.reportUnSubscribe(
                                                e,
                                                n.channel,
                                                n.uid,
                                                !1,
                                                r.elapse(),
                                                JSON.stringify(t)
                                            ),
                                                i && i(t);
                                        });
                                }
                            },
                            {
                                key: "mute",
                                value: function(e, t, i, n) {
                                    var r = this;
                                    if (
                                        (this._checkUid(e),
                                        this._checkWorker(),
                                        "video" === t ||
                                            "audio" === t ||
                                            "all" === t)
                                    ) {
                                        var s = _.create().start();
                                        this.worker
                                            .mute(e, t)
                                            .then(function(n) {
                                                r.argusReport.reportMuteRemote(
                                                    r.channel,
                                                    r.uid,
                                                    !0,
                                                    s.elapse(),
                                                    null,
                                                    e,
                                                    r.targetMap[t],
                                                    1
                                                ),
                                                    setTimeout(function() {
                                                        i && i();
                                                    }, 1);
                                            })
                                            .catch(function(i) {
                                                r.argusReport.reportMuteRemote(
                                                    r.channel,
                                                    r.uid,
                                                    !1,
                                                    s.elapse(),
                                                    JSON.stringify(i),
                                                    e,
                                                    r.targetMap[t],
                                                    1
                                                ),
                                                    n && n(i);
                                            });
                                    } else
                                        n(
                                            new Error(
                                                'target should be "video", "audio" or "all"'
                                            )
                                        );
                                }
                            },
                            {
                                key: "unmute",
                                value: function(e, t, i, n) {
                                    var r = this;
                                    if (
                                        (this._checkUid(e),
                                        this._checkWorker(),
                                        "video" === t ||
                                            "audio" === t ||
                                            "all" === t)
                                    ) {
                                        var s = _.create().start();
                                        this.worker
                                            .unmute(e, t)
                                            .then(function(n) {
                                                r.argusReport.reportMuteRemote(
                                                    r.channel,
                                                    r.uid,
                                                    !0,
                                                    s.elapse(),
                                                    null,
                                                    e,
                                                    r.targetMap[t],
                                                    -1
                                                ),
                                                    setTimeout(function() {
                                                        i && i();
                                                    }, 1);
                                            })
                                            .catch(function(i) {
                                                r.argusReport.reportMuteRemote(
                                                    r.channel,
                                                    r.uid,
                                                    !1,
                                                    s.elapse(),
                                                    JSON.stringify(i),
                                                    e,
                                                    r.targetMap[t],
                                                    -1
                                                ),
                                                    n && n(i);
                                            });
                                    } else
                                        n(
                                            new Error(
                                                'target should be "video", "audio" or "all"'
                                            )
                                        );
                                }
                            },
                            {
                                key: "setRemoteVideoStreamType",
                                value: function(e, t, i, n) {
                                    var r = this;
                                    this._checkUid(e), this._checkWorker();
                                    var s = _.create().start();
                                    this.worker
                                        .setRemoteVideoStreamType(e, t)
                                        .then(function(e) {
                                            r.argusReport.reportSetRemoteStreamType(
                                                r.channel,
                                                r.uid,
                                                !0,
                                                s.elapse(),
                                                null,
                                                t
                                            ),
                                                setTimeout(function() {
                                                    i && i();
                                                }, 1);
                                        })
                                        .catch(function(e) {
                                            r.argusReport.reportSetRemoteStreamType(
                                                r.channel,
                                                r.uid,
                                                !1,
                                                s.elapse(),
                                                JSON.stringify(e),
                                                t
                                            ),
                                                n && n(e);
                                        });
                                }
                            },
                            {
                                key: "renewToken",
                                value: function(e, t, i) {
                                    var n = this;
                                    this._checkWorker();
                                    var r = _.create().start();
                                    this.worker
                                        .renewToken(e)
                                        .then(function(e) {
                                            n.argusReport.reportRenewToken(
                                                n.channel,
                                                n.uid,
                                                !0,
                                                r.elapse(),
                                                null
                                            ),
                                                setTimeout(function() {
                                                    t && t();
                                                }, 1);
                                        })
                                        .catch(function(e) {
                                            n.argusReport.reportRenewToken(
                                                n.channel,
                                                n.uid,
                                                !1,
                                                r.elapse(),
                                                JSON.stringify(e)
                                            ),
                                                i && i(e);
                                        });
                                }
                            },
                            {
                                key: "muteLocal",
                                value: function(e, t, i) {
                                    var n = this;
                                    if (
                                        (this._checkWorker(),
                                        "video" === e ||
                                            "audio" === e ||
                                            "all" === e)
                                    ) {
                                        var r = _.create().start();
                                        this.worker
                                            .muteLocal(e)
                                            .then(function(i) {
                                                n.argusReport.reportMuteLocal(
                                                    n.channel,
                                                    n.uid,
                                                    !0,
                                                    r.elapse(),
                                                    null,
                                                    n.targetMap[e],
                                                    1
                                                ),
                                                    setTimeout(function() {
                                                        t && t();
                                                    }, 1);
                                            })
                                            .catch(function(t) {
                                                n.argusReport.reportMuteLocal(
                                                    n.channel,
                                                    n.uid,
                                                    !1,
                                                    r.elapse(),
                                                    JSON.stringify(t),
                                                    n.targetMap[e],
                                                    1
                                                ),
                                                    i && i(t);
                                            });
                                    } else
                                        i(
                                            new Error(
                                                'target should be "video", "audio" or "all"'
                                            )
                                        );
                                }
                            },
                            {
                                key: "unmuteLocal",
                                value: function(e, t, i) {
                                    var n = this;
                                    if (
                                        (this._checkWorker(),
                                        "video" === e ||
                                            "audio" === e ||
                                            "all" === e)
                                    ) {
                                        var r = _.create().start();
                                        this.worker
                                            .unmuteLocal(e)
                                            .then(function(i) {
                                                n.argusReport.reportMuteLocal(
                                                    n.channel,
                                                    n.uid,
                                                    !0,
                                                    r.elapse(),
                                                    null,
                                                    n.targetMap[e],
                                                    -1
                                                ),
                                                    setTimeout(function() {
                                                        t && t();
                                                    }, 1);
                                            })
                                            .catch(function(t) {
                                                n.argusReport.reportMuteLocal(
                                                    n.channel,
                                                    n.uid,
                                                    !1,
                                                    r.elapse(),
                                                    JSON.stringify(t),
                                                    n.targetMap[e],
                                                    -1
                                                ),
                                                    i && i(t);
                                            });
                                    } else
                                        i(
                                            new Error(
                                                'target should be "video", "audio" or "all"'
                                            )
                                        );
                                }
                            },
                            {
                                key: "leave",
                                value: function(e, t) {
                                    var i = this;
                                    if (
                                        this.worker &&
                                        this.worker.isWSConnected()
                                    ) {
                                        var n = _.create().start();
                                        this.worker
                                            .leave()
                                            .then(function(t) {
                                                i.argusReport.reportLeave(
                                                    i.channel,
                                                    i.uid,
                                                    !0,
                                                    n.elapse()
                                                ),
                                                    i.destroy(function() {
                                                        setTimeout(function() {
                                                            e && e();
                                                        }, 1);
                                                    });
                                            })
                                            .catch(function(e) {
                                                i.argusReport.reportLeave(
                                                    i.channel,
                                                    i.uid,
                                                    !1,
                                                    n.elapse(),
                                                    JSON.stringify(e)
                                                ),
                                                    t && t(e);
                                            });
                                    }
                                }
                            },
                            {
                                key: "_checkUid",
                                value: function(e) {
                                    if (
                                        !e ||
                                        "number" != typeof e ||
                                        !Object(o.is32Uint)(e)
                                    )
                                        throw new Error("Invalid uid type");
                                }
                            },
                            {
                                key: "_checkWorker",
                                value: function() {
                                    if (
                                        !this.worker ||
                                        !this.worker.isWSConnected()
                                    )
                                        throw new Error(
                                            "Disconnected from server"
                                        );
                                }
                            },
                            {
                                key: "isConnected",
                                value: function() {
                                    return !(
                                        !this.worker ||
                                        !this.worker.isWSConnected()
                                    );
                                }
                            },
                            {
                                key: "updatePusherStateChange",
                                value: function(e) {
                                    if (this.pushUrl) {
                                        var t = e.detail.code,
                                            i = e.detail.message;
                                        this.argusReport.reportPusherStateChange(
                                            this.channel,
                                            this.uid,
                                            t >= 1002,
                                            0,
                                            this.pushUrl,
                                            t,
                                            {
                                                message: i
                                            }
                                        );
                                    }
                                }
                            },
                            {
                                key: "updatePlayerStateChange",
                                value: function(e, t) {
                                    var i = this.playUrls.get(Number(e));
                                    if (i) {
                                        var n = t.detail.code,
                                            r = t.detail.message;
                                        this.argusReport.reportPlayerStateChange(
                                            e,
                                            this.channel,
                                            this.uid,
                                            n >= 2002,
                                            0,
                                            i,
                                            n,
                                            {
                                                message: r
                                            }
                                        );
                                    }
                                }
                            },
                            {
                                key: "updatePusherNetStatus",
                                value: function(e) {
                                    if (this.pushUrl) {
                                        var t = e.detail.info;
                                        this.argusReport.setPusherNetData(t);
                                    }
                                }
                            },
                            {
                                key: "updatePlayerNetStatus",
                                value: function(e, t) {
                                    if (this.playUrls.get(Number(e))) {
                                        var i = t.detail.info;
                                        this.argusReport.setPlayerNetData(e, i);
                                    }
                                }
                            },
                            {
                                key: "send",
                                value: function(e, t, i) {
                                    this._checkWorker(),
                                        this.worker
                                            .send(e)
                                            .then(function(e) {
                                                t && t(e);
                                            })
                                            .catch(function(e) {
                                                i && i(e);
                                            });
                                }
                            },
                            {
                                key: "updatePushUrl",
                                value: function(e, t) {
                                    var i = this;
                                    this._checkWorker(),
                                        this.worker
                                            .updatePushUrl()
                                            .then(function(t) {
                                                setTimeout(function() {
                                                    try {
                                                        this.grafanaReport.report(
                                                            "update_url",
                                                            "success"
                                                        );
                                                    } catch (e) {}
                                                    e && e(t);
                                                }, 1);
                                            })
                                            .catch(function(e) {
                                                try {
                                                    i.grafanaReport.report(
                                                        "update_url",
                                                        "fail",
                                                        e.code
                                                    );
                                                } catch (e) {}
                                                t && t(e);
                                            });
                                }
                            },
                            {
                                key: "destroy",
                                value: function(e, t) {
                                    var i = this;
                                    this.worker
                                        ? (this.worker.destroy(function() {
                                              (i.pushUrl = null),
                                                  (i.playUrls = null),
                                                  e && e();
                                          }),
                                          (this.worker = null))
                                        : ((this.pushUrl = null),
                                          (this.playUrls = null),
                                          e && e()),
                                        this.grafanaReport.destroy(),
                                        this.argusReport.destroy();
                                }
                            },
                            {
                                key: "startChannelMediaRelay",
                                value: function(e, t) {
                                    if (
                                        !(
                                            e instanceof
                                            k.ChannelMediaRelayConfiguration
                                        )
                                    )
                                        throw "Configration should be instance of [ChannelMediaRelayConfiguration]";
                                    var i = e.getSrcChannelMediaInfo(),
                                        n = e.getDestChannelMediaInfos();
                                    if (Object(fe.isEmpty)(i))
                                        throw "srcChannelMediaInfo should not be empty";
                                    if (Object(fe.isEmpty)(n) || 0 === n.length)
                                        throw "destChannelMediaInfos should not be empty";
                                    if (
                                        (d.default.debug(
                                            "[startChannelMediaRelay]: srcInfo: ",
                                            i,
                                            " destInfo: ",
                                            n
                                        ),
                                        !Object(o.is32Uint)(i.uid))
                                    )
                                        throw "Invalid uid in srcChannelMediaInfo";
                                    if (
                                        !Object(fe.isValidChannelName)(
                                            i.channelName
                                        )
                                    )
                                        throw "Invalid channelName in srcChannelMediaInfo";
                                    if (
                                        i.token &&
                                        !Object(fe.isValidToken)(i.token)
                                    )
                                        throw "Invalid token in srcChannelMediaInfo";
                                    if (
                                        (n.forEach(function(e) {
                                            if (!Object(o.is32Uint)(e.uid))
                                                throw "Invalid uid in destChannelMediaInfo";
                                            if (
                                                !Object(fe.isValidChannelName)(
                                                    e.channelName
                                                )
                                            )
                                                throw "Invalid channelName in destChannelMediaInfo";
                                            if (
                                                e.token &&
                                                !Object(fe.isValidToken)(
                                                    e.token
                                                )
                                            )
                                                throw "Invalid token in destChannelMediaInfo";
                                        }),
                                        !this.worker)
                                    )
                                        throw "startChannelMediaRelay should be used after join";
                                    this.worker
                                        .startChannelMediaRelay(e)
                                        .then(function() {
                                            t && t();
                                        })
                                        .catch(function(e) {
                                            t && t(e);
                                        });
                                }
                            },
                            {
                                key: "updateChannelMediaRelay",
                                value: function(e, t) {
                                    if (
                                        !(
                                            e instanceof
                                            k.ChannelMediaRelayConfiguration
                                        )
                                    )
                                        throw "Configration should be instance of [ChannelMediaRelayConfiguration]";
                                    var i = e.getSrcChannelMediaInfo(),
                                        n = e.getDestChannelMediaInfos();
                                    if (Object(fe.isEmpty)(i))
                                        throw "srcChannelMediaInfo should not be empty";
                                    if (Object(fe.isEmpty)(n) || 0 === n.length)
                                        throw "destChannelMediaInfos should not be empty";
                                    if (
                                        (d.default.debug(
                                            "[updateChannelMediaRelay]: srcInfo: ",
                                            i,
                                            " destInfo: ",
                                            n
                                        ),
                                        !Object(o.is32Uint)(i.uid))
                                    )
                                        throw "Invalid uid in srcChannelMediaInfo";
                                    if (
                                        !Object(fe.isValidChannelName)(
                                            i.channelName
                                        )
                                    )
                                        throw "Invalid channelName in srcChannelMediaInfo";
                                    if (
                                        i.token &&
                                        !Object(fe.isValidToken)(i.token)
                                    )
                                        throw "Invalid token in srcChannelMediaInfo";
                                    if (
                                        (n.forEach(function(e) {
                                            if (!Object(o.is32Uint)(e.uid))
                                                throw "Invalid uid in destChannelMediaInfo";
                                            if (
                                                !Object(fe.isValidChannelName)(
                                                    e.channelName
                                                )
                                            )
                                                throw "Invalid channelName in destChannelMediaInfo";
                                            if (
                                                e.token &&
                                                !Object(fe.isValidToken)(
                                                    e.token
                                                )
                                            )
                                                throw "Invalid token in destChannelMediaInfo";
                                        }),
                                        !this.worker)
                                    )
                                        throw "updateChannelMediaRelay should be used after join";
                                    this.worker
                                        .updateChannelMediaRelay(e)
                                        .then(function() {
                                            t && t();
                                        })
                                        .catch(function(e) {
                                            t && t(e);
                                        });
                                }
                            },
                            {
                                key: "stopChannelMediaRelay",
                                value: function(e) {
                                    d.default.debug("[stopChannelMediaRelay]"),
                                        this.worker
                                            .stopChannelMediaRelay()
                                            .then(function() {
                                                e && e();
                                            })
                                            .catch(function(t) {
                                                e && e(t);
                                            });
                                }
                            }
                        ]),
                        e
                    );
                })();
        }
    ]);
});
